From ecf079d6910db4672ffdcb42af978765cbe7099d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 27 Jan 2006 10:36:29 +0000 Subject: [PATCH] Fix test program so it builds with Borland. [SVN r32432] --- test/decay_test.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/decay_test.cpp b/test/decay_test.cpp index 4c91b4b..594d5c2 100755 --- a/test/decay_test.cpp +++ b/test/decay_test.cpp @@ -32,16 +32,16 @@ namespace boost // An almost optimal version of std::make_pair() // template< class F, class S > - inline std::pair< BOOST_DEDUCED_TYPENAME ::tt::decay::type, - BOOST_DEDUCED_TYPENAME ::tt::decay::type > + inline std::pair< BOOST_DEDUCED_TYPENAME tt::decay::type, + BOOST_DEDUCED_TYPENAME tt::decay::type > make_pair( const F& f, const S& s ) { - return std::pair< BOOST_DEDUCED_TYPENAME ::tt::decay::type, - BOOST_DEDUCED_TYPENAME ::tt::decay::type >( f, s ); + return std::pair< BOOST_DEDUCED_TYPENAME tt::decay::type, + BOOST_DEDUCED_TYPENAME tt::decay::type >( f, s ); } /* - This overload will f*** up vc7.1 + This overload will mess up vc7.1 template< class F, class S > inline std::pair< BOOST_DEDUCED_TYPENAME ::tt::decay::type, @@ -74,11 +74,15 @@ TT_TEST_BEGIN(is_class) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::decay::type,const wchar_t*>::value), true ); + + typedef int f1_type(void); + typedef int f2_type(int); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< - ::tt::decay::type,int (*)(void)>::value), + ::tt::decay::type,int (*)(void)>::value), true ); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< - ::tt::decay::type,int (*)(int)>::value), + ::tt::decay::type,int (*)(int)>::value), true ); std::pair p = boost::make_pair( "foo", "bar" );