diff --git a/test/hash_info.cpp b/test/hash_info.cpp index 2a6c2c1..c0b8ec7 100644 --- a/test/hash_info.cpp +++ b/test/hash_info.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #if defined(BOOST_MSVC) @@ -61,16 +63,15 @@ void write_compiler_info() { #endif +#define PRINT(x) std::cout << #x ": " << x << std::endl + int main() { write_compiler_info(); + std::cout << std::endl; - std::cout << "__cplusplus: " - << __cplusplus - << std::endl; - - std::cout << "BOOST_CXX_VERSION: " - << BOOST_CXX_VERSION - << std::endl; + PRINT(__cplusplus); + PRINT(BOOST_CXX_VERSION); + std::cout << std::endl; #if defined(BOOST_NO_CXX17_HDR_STRING_VIEW) std::cout << "No " << std::endl; @@ -102,4 +103,22 @@ int main() { std::cout << "Has " << std::endl; #endif + std::cout << std::endl; + + PRINT(CHAR_BIT); + std::cout << std::endl; + + PRINT(sizeof(std::size_t)*CHAR_BIT); + std::cout << std::endl; + + PRINT(sizeof(float)*CHAR_BIT); + PRINT(std::numeric_limits::digits); + std::cout << std::endl; + + PRINT(sizeof(double)*CHAR_BIT); + PRINT(std::numeric_limits::digits); + std::cout << std::endl; + + PRINT(sizeof(long double)*CHAR_BIT); + PRINT(std::numeric_limits::digits); }