icecream-cpp
icecream-cpp copied to clipboard
cannot display char as integer
#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