diff --git a/include/boost/numeric/ublas/detail/concepts.hpp b/include/boost/numeric/ublas/detail/concepts.hpp index ce99744b..8133670c 100644 --- a/include/boost/numeric/ublas/detail/concepts.hpp +++ b/include/boost/numeric/ublas/detail/concepts.hpp @@ -634,77 +634,70 @@ namespace boost { namespace numeric { namespace ublas { } }; + /** introduce anonymous namespace to make following functions + * local to the current compilation unit. + */ + namespace { + template T ZeroElement (T); template<> - BOOST_UBLAS_INLINE float ZeroElement (float) { return 0.f; } template<> - BOOST_UBLAS_INLINE double ZeroElement (double) { return 0.; } template<> - BOOST_UBLAS_INLINE vector ZeroElement (vector) { return zero_vector (); } template<> - BOOST_UBLAS_INLINE vector ZeroElement (vector) { return zero_vector (); } template<> - BOOST_UBLAS_INLINE matrix ZeroElement (matrix) { return zero_matrix (); } template<> - BOOST_UBLAS_INLINE matrix ZeroElement (matrix) { return zero_matrix (); } template<> - BOOST_UBLAS_INLINE std::complex ZeroElement (std::complex) { return std::complex (0.f); } template<> - BOOST_UBLAS_INLINE std::complex ZeroElement (std::complex) { return std::complex (0.); } template<> - BOOST_UBLAS_INLINE vector > ZeroElement (vector >) { return zero_vector > (); } template<> - BOOST_UBLAS_INLINE vector > ZeroElement (vector >) { return zero_vector > (); } template<> - BOOST_UBLAS_INLINE matrix > ZeroElement (matrix >) { return zero_matrix > (); } template<> - BOOST_UBLAS_INLINE matrix > ZeroElement (matrix >) { return zero_matrix > (); @@ -714,49 +707,41 @@ namespace boost { namespace numeric { namespace ublas { T OneElement (T); template<> - BOOST_UBLAS_INLINE float OneElement (float) { return 1.f; } template<> - BOOST_UBLAS_INLINE double OneElement (double) { return 1.; } template<> - BOOST_UBLAS_INLINE matrix OneElement (matrix) { return identity_matrix (); } template<> - BOOST_UBLAS_INLINE matrix OneElement (matrix) { return identity_matrix (); } template<> - BOOST_UBLAS_INLINE std::complex OneElement (std::complex) { return std::complex (1.f); } template<> - BOOST_UBLAS_INLINE std::complex OneElement (std::complex) { return std::complex (1.); } template<> - BOOST_UBLAS_INLINE matrix > OneElement (matrix >) { return identity_matrix > (); } template<> - BOOST_UBLAS_INLINE matrix > OneElement (matrix >) { return identity_matrix > (); @@ -908,7 +893,6 @@ namespace boost { namespace numeric { namespace ublas { } }; - BOOST_UBLAS_INLINE void concept_checks () { // Allow tests to be group to keep down compiler storage requirement @@ -1549,6 +1533,8 @@ namespace boost { namespace numeric { namespace ublas { #endif } + } // end of anonymous namespace + }}} #endif