[Cppunit-cvs] cppunit2/include/cpptl config.h,1.5,1.6
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-02-23 21:35:26
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26803/include/cpptl Modified Files: config.h Log Message: * fixed detection of MSVC compiler (other compilers will now correctly skip those specific configurations). Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/config.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config.h 15 Nov 2004 08:50:59 -0000 1.5 --- config.h 23 Feb 2005 21:35:18 -0000 1.6 *************** *** 7,39 **** /////////////////////////////////////////////////////////////////////////// ! # if _MSC_VER <= 1200 // VC++ 6 or before ! # pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info ! # pragma warning( disable : 4800 ) // forcing value to bool performance warning ! # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch ! # define CPPTL_NO_VECTOR_STD_ITERATOR ! # define CPPTL_NO_FUNCTION_TEMPLATE_ORDERING ! # define CPPTL_NO_TEMPLATE_PARTIAL_SPECIALIZATION ! # define CPPTL_HAS_INT64 1 ! # endif ! # if _MSC_VER >= 1200 // VC++ 6 and above ! # undef CPPTL_NO_ENUM_STATIC_CONSTANT ! # endif ! # if _MSC_VER <= 1300 // VC++ 7.0 or before // VC++ 7.0 does have deduced typename, but their behavior is not consistent with // VC++ 7.1. Since it is not required to compile, we just pretend it's not available. ! # define CPPTL_NO_DEDUCED_TYPENAME ! # define CPPTL_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif ! # if _MSC_VER >= 1310 // VC++ 7.1 ! # define CPPTL_HAS_INT64 1 //# define CPPTL_HAS_LONGLONG 1 // support but not by default. ! # pragma warning( disable : 4800 ) // forcing value to bool performance warning ! # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch ! # pragma warning( disable : 4180 ) // qualifier applied to function type has no meaning ! # endif ! --- 7,41 ---- /////////////////////////////////////////////////////////////////////////// ! // Microsoft Visual C++ ! # if defined(_MSC_VER) ! # if _MSC_VER <= 1200 // VC++ 6 or before ! # pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info ! # pragma warning( disable : 4800 ) // forcing value to bool performance warning ! # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch ! # define CPPTL_NO_VECTOR_STD_ITERATOR ! # define CPPTL_NO_FUNCTION_TEMPLATE_ORDERING ! # define CPPTL_NO_TEMPLATE_PARTIAL_SPECIALIZATION ! # define CPPTL_HAS_INT64 1 ! # endif ! # if _MSC_VER >= 1200 // VC++ 6 and above ! # undef CPPTL_NO_ENUM_STATIC_CONSTANT ! # endif ! # if _MSC_VER <= 1300 // VC++ 7.0 or before // VC++ 7.0 does have deduced typename, but their behavior is not consistent with // VC++ 7.1. Since it is not required to compile, we just pretend it's not available. ! # define CPPTL_NO_DEDUCED_TYPENAME ! # define CPPTL_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif ! # if _MSC_VER >= 1310 // VC++ 7.1 ! # define CPPTL_HAS_INT64 1 //# define CPPTL_HAS_LONGLONG 1 // support but not by default. ! # pragma warning( disable : 4800 ) // forcing value to bool performance warning ! # pragma warning( disable : 4018 ) // '<' signed/unsigned mismatch ! # pragma warning( disable : 4180 ) // qualifier applied to function type has no meaning ! # endif ! #endif *************** *** 66,69 **** --- 68,87 ---- # endif + /// CPPTL_NO_TYPE_DEFAULT_ARG is defined if the compiler does not support the following construct: + /// template<class ValueType> void doSomething( CppTL::Type<ValueType> type = CppTL::Type<ValueType>() ); + /// With allow for the following usage: + /// doSomething<int>(); + /// Some compiler can not deduce type correctly or may cause silent linker error (all function + /// instantion for different type being recognized as a single one). + /// If this construct is not supported, the portable call syntax should be use: + /// doSomething( CppTL::Type<int>() ); + /// @todo Should this be kept. It is not used at the time... + #if defined(CPPTL_NO_TYPE_DEFAULT_ARG) + # define CPPTL_TYPE_DEFAULT_ARG(aType) + #else + # define CPPTL_TYPE_DEFAULT_ARG(aType) = ::CppTL::Type<aType>() + #endif + + // auto-link specification /////////////////////////////////////////////////////////////////////////// *************** *** 102,106 **** }; - /// Base class for non copyable class. class CPPTL_API NonCopyable --- 120,123 ---- |