Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot display char as integer #33

Open
logerrors opened this issue Sep 3, 2022 · 0 comments
Open

cannot display char as integer #33

logerrors opened this issue Sep 3, 2022 · 0 comments

Comments

@logerrors
Copy link

CleanShot 2022-09-03 at 10 51 31@2x

#include <algorithm>
#include <numeric> 

#include "icecream.hpp"

using namespace std;

#define DETECT_TYPE(x)                        \
    do                                        \
    {                                         \
        IC(sizeof(x));                        \
        IC_("d", std::numeric_limits<x>::max());    \
        IC_("d", std::numeric_limits<x>::min());    \
        IC_("d", std::numeric_limits<x>::lowest()); \
    } while (0)


int main(int argc, char **argv)
{
    DETECT_TYPE(char);
    DETECT_TYPE(unsigned char);
    return 0;
}

expect: it should display max: 128, min: -127, lowest: -127
gcc 11.2 linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant