diff --git a/include/boost/numeric/ublas/detail/config.hpp b/include/boost/numeric/ublas/detail/config.hpp index ebc198f4..9e674105 100644 --- a/include/boost/numeric/ublas/detail/config.hpp +++ b/include/boost/numeric/ublas/detail/config.hpp @@ -33,26 +33,19 @@ #define BOOST_UBLAS_CPP_GE_2011 +#elif BOOST_MSVC >= 1800 + +#define BOOST_UBLAS_CPP_GE_2011 + #else #undef BOOST_UBLAS_CPP_GE_2011 // Make sure no one defined it #endif -#define BOOST_UBLAS_CONSTEXPR constexpr // Every compiler besides MSVC<=1800 - // Microsoft Visual C++ #if defined (BOOST_MSVC) && ! defined (BOOST_STRICT_CONFIG) -// MSVC C++11 -#if BOOST_MSVC >= 1800 -#define BOOST_UBLAS_CPP_GE_2011 -#if (BOOST_MSVC == 1800) -#define BOOST_UBLAS_CONSTEXPR //Hopefully versions over 1800 (MSVC2013) will include constexpr (picked from above) -#endif -#endif - - // Version 7.1 #if BOOST_MSVC == 1310 // One of these workarounds is needed for MSVC 7.1 AFAIK @@ -308,3 +301,4 @@ bool disable_type_check::value = false; #endif + diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index f9789ccc..d0639107 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -14,6 +14,7 @@ #ifndef _BOOST_UBLAS_MATRIX_ #define _BOOST_UBLAS_MATRIX_ +#include #include #include #include @@ -1282,7 +1283,7 @@ namespace boost { namespace numeric { * You can also use the free size<>() function in operation/size.hpp as size<1>(m) where m is a fixed_matrix */ BOOST_UBLAS_INLINE - constexpr size_type size1 () const { + BOOST_CONSTEXPR size_type size1 () const { return M; } @@ -1290,7 +1291,7 @@ namespace boost { namespace numeric { * You can also use the free size<>() function in operation/size.hpp as size<2>(m) where m is a fixed_matrix */ BOOST_UBLAS_INLINE - constexpr size_type size2 () const { + BOOST_CONSTEXPR size_type size2 () const { return N; } @@ -3474,7 +3475,7 @@ namespace boost { namespace numeric { // Resizing BOOST_UBLAS_INLINE - void resize (size_type size, bool preserve = true) { + void resize (size_type size, bool /*preserve*/ = true) { size1_ = size; size2_ = size; } @@ -3949,7 +3950,7 @@ namespace boost { namespace numeric { // Resizing BOOST_UBLAS_INLINE - void resize (size_type size, bool preserve = true) { + void resize (size_type size, bool /*preserve*/ = true) { size1_ = size; size2_ = size; size_common_ = ((std::min)(size1_, size2_)); @@ -5220,7 +5221,7 @@ namespace boost { namespace numeric { // Element lookup BOOST_UBLAS_INLINE - const_iterator1 find1 (int rank, size_type i, size_type j) const { + const_iterator1 find1 (int /*rank*/, size_type i, size_type j) const { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return const_iterator1 (*this, i, j); #else @@ -5228,7 +5229,7 @@ namespace boost { namespace numeric { #endif } BOOST_UBLAS_INLINE - iterator1 find1 (int rank, size_type i, size_type j) { + iterator1 find1 (int /*rank*/, size_type i, size_type j) { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return iterator1 (*this, i, j); #else @@ -5236,7 +5237,7 @@ namespace boost { namespace numeric { #endif } BOOST_UBLAS_INLINE - const_iterator2 find2 (int rank, size_type i, size_type j) const { + const_iterator2 find2 (int /*rank*/, size_type i, size_type j) const { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return const_iterator2 (*this, i, j); #else @@ -5244,7 +5245,7 @@ namespace boost { namespace numeric { #endif } BOOST_UBLAS_INLINE - iterator2 find2 (int rank, size_type i, size_type j) { + iterator2 find2 (int /*rank*/, size_type i, size_type j) { #ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR return iterator2 (*this, i, j); #else diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 4136bb88..3be69faf 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -289,7 +289,7 @@ namespace boost { namespace numeric { namespace ublas { // Serialization template - void serialize(Archive & ar, const unsigned int version) + void serialize(Archive & ar, const unsigned int /*version*/) { serialization::collection_size_type s(size_); ar & serialization::make_nvp("size",s); @@ -483,7 +483,7 @@ namespace boost { namespace numeric { namespace ublas { friend class boost::serialization::access; template - void serialize(Archive & ar, const unsigned int version) + void serialize(Archive & ar, const unsigned int /*version*/) { serialization::collection_size_type s(size_); ar & serialization::make_nvp("size", s); diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 471d063a..c90e4296 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -17,6 +17,7 @@ #ifndef _BOOST_UBLAS_VECTOR_ #define _BOOST_UBLAS_VECTOR_ +#include #include #include #include @@ -88,7 +89,7 @@ namespace boost { namespace numeric { namespace ublas { /// \param data container of type \c A /// \todo remove this definition because \c size is not used BOOST_UBLAS_INLINE - vector (size_type size, const array_type &data): + vector (size_type /*size*/, const array_type &data): vector_container (), data_ (data) {} @@ -931,7 +932,7 @@ namespace boost { namespace numeric { namespace ublas { /// \brief Return the size of the vector BOOST_UBLAS_INLINE - BOOST_UBLAS_CONSTEXPR size_type size () const{ // should have a const after C++14 + BOOST_CONSTEXPR size_type size () const{ // should have a const after C++14 return data_.size (); } @@ -1723,7 +1724,7 @@ namespace boost { namespace numeric { namespace ublas { // Element support BOOST_UBLAS_INLINE - const_pointer find_element (size_type i) const { + const_pointer find_element (size_type /*i*/) const { return & zero_; } @@ -2480,7 +2481,7 @@ namespace boost { namespace numeric { namespace ublas { // Resizing BOOST_UBLAS_INLINE - void resize (size_type size, bool preserve = true) { + void resize (size_type size, bool /*preserve*/ = true) { if (size > N) bad_size ().raise (); size_ = size; diff --git a/include/boost/numeric/ublas/vector_proxy.hpp b/include/boost/numeric/ublas/vector_proxy.hpp index 606800ce..e3df99a3 100644 --- a/include/boost/numeric/ublas/vector_proxy.hpp +++ b/include/boost/numeric/ublas/vector_proxy.hpp @@ -1336,8 +1336,8 @@ namespace boost { namespace numeric { namespace ublas { // Closure comparison BOOST_UBLAS_INLINE - bool same_closure (const vector_indirect &vr) const { -return true; + bool same_closure (const vector_indirect &/*vr*/) const { + return true; } // Comparison