From a7d0712cb294522e446618a1d73f026d985a4b89 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 8 May 2001 11:16:35 +0000 Subject: [PATCH] Fixes for Sun C++ 5.1 [SVN r10060] --- include/boost/type_traits/arithmetic_traits.hpp | 3 ++- tests/composite_traits_test.cpp | 3 +++ tests/cv_traits_test.cpp | 3 +++ tests/is_function_test.cpp | 3 +++ tests/is_same_test.cpp | 3 +++ tests/object_type_traits_test.cpp | 3 +++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/arithmetic_traits.hpp b/include/boost/type_traits/arithmetic_traits.hpp index d6295fa..bccac51 100644 --- a/include/boost/type_traits/arithmetic_traits.hpp +++ b/include/boost/type_traits/arithmetic_traits.hpp @@ -23,7 +23,7 @@ #include #endif -#include // for ULLONG_MAX/ULONG_LONG_MAX +#include // for ULLONG_MAX/ULONG_LONG_MAX namespace boost{ @@ -267,3 +267,4 @@ struct is_fundamental + diff --git a/tests/composite_traits_test.cpp b/tests/composite_traits_test.cpp index c5c3590..de69df8 100644 --- a/tests/composite_traits_test.cpp +++ b/tests/composite_traits_test.cpp @@ -121,6 +121,8 @@ int cpp_main(int argc, char* argv[]) // define the number of failures expected for given compilers: #ifdef __BORLANDC__ unsigned int expected_failures = 2; +#elif defined(__SUNPRO_CC) +unsigned int expected_failures = 11; #elif defined(__GNUC__) unsigned int expected_failures = 1; // can't handle cv-qualified references #elif defined(BOOST_MSVC) @@ -133,3 +135,4 @@ unsigned int expected_failures = 0; + diff --git a/tests/cv_traits_test.cpp b/tests/cv_traits_test.cpp index 29beb57..deb1a07 100644 --- a/tests/cv_traits_test.cpp +++ b/tests/cv_traits_test.cpp @@ -61,6 +61,8 @@ int cpp_main(int argc, char* argv[]) // define the number of failures expected for given compilers: #ifdef BOOST_MSVC unsigned int expected_failures = 3; +#elif defined(__SUNPRO_CC) +unsigned int expected_failures = 1; #elif defined(__GNUC__) unsigned int expected_failures = 1; // cr_type doesn't compile #else @@ -68,3 +70,4 @@ unsigned int expected_failures = 0; #endif + diff --git a/tests/is_function_test.cpp b/tests/is_function_test.cpp index 140aeac..98e73f4 100644 --- a/tests/is_function_test.cpp +++ b/tests/is_function_test.cpp @@ -58,11 +58,13 @@ void is_function_tester::check() #endif } +#ifndef __SUNPRO_CC template void is_function_test(T& foo) { is_function_tester::check(); } +#endif #ifndef BOOST_MSVC template void is_function_test(const T& foo) @@ -108,3 +110,4 @@ unsigned int expected_failures = 0; + diff --git a/tests/is_same_test.cpp b/tests/is_same_test.cpp index 50ac656..cc318fa 100644 --- a/tests/is_same_test.cpp +++ b/tests/is_same_test.cpp @@ -41,7 +41,10 @@ int cpp_main(int argc, char* argv[]) #ifdef BOOST_MSVC // can't separate void and cv-void: unsigned int expected_failures = 1; +#elif defined(__SUNPRO_CC) +unsigned int expected_failures = 2; #else unsigned int expected_failures = 0; #endif + diff --git a/tests/object_type_traits_test.cpp b/tests/object_type_traits_test.cpp index be54934..5d97aa0 100644 --- a/tests/object_type_traits_test.cpp +++ b/tests/object_type_traits_test.cpp @@ -213,6 +213,8 @@ int cpp_main(int argc, char* argv[]) #ifdef __BORLANDC__ // can't handle enum's or classes that are POD's unsigned int expected_failures = 10; +#elif defined(__SUNPRO_CC) +unsigned int expected_failures = 58; #elif defined(__GNUC__) // classes that are POD's, or empty: unsigned int expected_failures = 4; @@ -225,3 +227,4 @@ unsigned int expected_failures = 4; +