diff --git a/include/boost/numeric/ublas/config.hpp b/include/boost/numeric/ublas/config.hpp index 9904a9b3..9c311954 100644 --- a/include/boost/numeric/ublas/config.hpp +++ b/include/boost/numeric/ublas/config.hpp @@ -103,10 +103,14 @@ #endif - // GNU Compiler Collection #if defined (__GNUC__) && ! defined (BOOST_STRICT_CONFIG) +#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4 +// By ABI definition see GCC bug id 9982 +#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW +#endif + #if __GNUC__ <= 2 && __GNUC_MINOR__ <= 95 #define BOOST_UBLAS_NO_PROXY_SHORTCUTS #define BOOST_UBLAS_NO_MEMBER_FRIENDS @@ -119,10 +123,14 @@ #endif - // Intel Compiler #if defined (BOOST_INTEL) && ! defined (BOOST_STRICT_CONFIG) +#if (BOOST_INTEL >= 800) +// By inspection of compiler results +#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW +#endif + #if (BOOST_INTEL < 800) // Base traits templates syntax untested #define BOOST_UBLAS_NO_ITERATOR_BASE_TRAITS @@ -141,14 +149,6 @@ namespace boost { namespace numeric { namespace ublas { }}} namespace std { - // iter_swap needed for ICC on Itanium? - template - inline - void iter_swap (boost::numeric::ublas::indexed_iterator it1, - boost::numeric::ublas::indexed_iterator it2) { - swap (*it1, *it2); - } - template inline void swap (boost::numeric::ublas::index_pair i1, boost::numeric::ublas::index_pair i2) { @@ -159,13 +159,19 @@ namespace std { void swap (boost::numeric::ublas::index_triple i1, boost::numeric::ublas::index_triple i2) { i1.swap (i2); } + // iter_swap also needed for ICC on Itanium? + template + inline + void iter_swap (boost::numeric::ublas::indexed_iterator it1, + boost::numeric::ublas::indexed_iterator it2) { + swap (*it1, *it2); + } } #endif #endif - // Comeau compiler - thanks to Kresimir Fresl #if defined (__COMO__) && ! defined (BOOST_STRICT_CONFIG) @@ -177,7 +183,6 @@ namespace std { #endif - // HP aCC C++ compiler #if defined (__HP_aCC) && ! defined (BOOST_STRICT_CONFIG) // No version specific configuration @@ -185,16 +190,19 @@ namespace std { #endif - -// SGI C++ compiler +// SGI MIPSpro C++ compiler #if defined (__sgi) && ! defined (BOOST_STRICT_CONFIG) // Missing std::abs overloads for float types in are in // This should should be library version specific. #include +#if __COMPILER_VERSION >=650 +// By inspection of compiler results - thanks to Peter Schmitteckert +#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW #endif +#endif // Metrowerks Codewarrior