2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-22 15:52:18 +00:00

enable array placement new for some compilers

This commit is contained in:
Michael Stevens
2004-10-03 05:24:13 +00:00
parent 418640318c
commit b344eb93ef

View File

@@ -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<class C, class IC>
inline
void iter_swap (boost::numeric::ublas::indexed_iterator<C, IC> it1,
boost::numeric::ublas::indexed_iterator<C, IC> it2) {
swap (*it1, *it2);
}
template<class V>
inline
void swap (boost::numeric::ublas::index_pair<V> i1, boost::numeric::ublas::index_pair<V> i2) {
@@ -159,13 +159,19 @@ namespace std {
void swap (boost::numeric::ublas::index_triple<M> i1, boost::numeric::ublas::index_triple<M> i2) {
i1.swap (i2);
}
// iter_swap also needed for ICC on Itanium?
template<class C, class IC>
inline
void iter_swap (boost::numeric::ublas::indexed_iterator<C, IC> it1,
boost::numeric::ublas::indexed_iterator<C, IC> 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 <cmath> are in <cstdlib>
// This should should be library version specific.
#include <cstdlib>
#if __COMPILER_VERSION >=650
// By inspection of compiler results - thanks to Peter Schmitteckert
#define BOOST_UBLAS_USEFUL_ARRAY_PLACEMENT_NEW
#endif
#endif
// Metrowerks Codewarrior