Skip to content

Commit b59ff13

Browse files
author
Dale Wilson
committed
Force instantiation of hash_combine to work around a problem that showed up in boost 1.62.0. Disable meangingless Visual Studio warnings.
1 parent a6aa098 commit b59ff13

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/mfast/decimal_ref.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@
1414
template class boost::multiprecision::backends::cpp_dec_float<18>;
1515

1616
#if BOOST_VERSION >= 106200
17+
1718
#include <boost/functional/hash.hpp>
1819

20+
#if defined(_MSC_VER)
21+
#pragma warning(disable: 4667) // no function template defined that matches forced instantiation
22+
#else
23+
// This doesn't work in MSVC, but apparently it isn't needed.
1924
template void boost::hash_combine<boost::multiprecision::backends::cpp_dec_float<18u, int, void>::enum_fpclass_type>(unsigned long&, boost::multiprecision::backends::cpp_dec_float<18u, int, void>::enum_fpclass_type const&);
25+
#endif
2026
template void boost::hash_combine<bool>(unsigned long&, bool const&);
2127
template void boost::hash_combine<int>(unsigned long&, int const&);
2228
template void boost::hash_combine<unsigned int>(unsigned long&, unsigned int const&);

src/mfast/field_instructions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifdef _MSC_VER
99
#pragma warning(disable : 4275) // non dll-interface class used as base for
1010
// dll-interface class
11+
#pragma warning(disable : 4996) // Microsoft deprecates C++ standard library.
1112
#endif //_MSC_VER
1213

1314
#include "instructions/int_instructions.h"

0 commit comments

Comments
 (0)