diff --git a/test/limits_test.cpp b/test/limits_test.cpp index 8c27b460..7b0f7217 100644 --- a/test/limits_test.cpp +++ b/test/limits_test.cpp @@ -28,13 +28,19 @@ * Therefore, avoid explicit function template instantiations. */ +template inline T make_char_numeric_for_streaming(T x) { return x; } +inline int make_char_numeric_for_streaming(char c) { return c; } +inline int make_char_numeric_for_streaming(signed char c) { return c; } +inline int make_char_numeric_for_streaming(unsigned char c) { return c; } + template void test_integral_limits(const T &, const char * msg) { typedef std::numeric_limits lim; std::cout << "Testing " << msg << " (size " << sizeof(T) << ")" - << " min: " << lim::min() << ", max: " << lim::max() + << " min: " << make_char_numeric_for_streaming(lim::min()) + << ", max: " << make_char_numeric_for_streaming(lim::max()) << std::endl; BOOST_TEST(lim::is_specialized);