Skip to content

Commit

Permalink
Disable MSVC warning C4127
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Dec 22, 2023
1 parent 27bd3de commit 04012da
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions include/boost/numeric/odeint/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <string>
#include <sstream>

#include <boost/config.hpp>

#define ODEINT_MAJOR_VERSION 2
#define ODEINT_MINOR_VERSION 2
Expand All @@ -39,14 +39,26 @@ const int patch_level = ODEINT_PATCH_LEVEL ;

}

#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable : 4127)
#endif

inline std::string get_version_string( void )
{
std::ostringstream str;
str << "v" << version::major << "." << version::minor;
if( version::patch_level != 0 ) str << "_" << version::patch_level;
BOOST_IF_CONSTEXPR( version::patch_level != 0 )
{
str << "_" << version::patch_level;
}

return str.str();
}

#ifdef _MSC_VER
# pragma warning(pop)
#endif

}
}
Expand Down

0 comments on commit 04012da

Please sign in to comment.