Skip to content

Commit

Permalink
Force instantiation of hash_combine to work around a problem that sho…
Browse files Browse the repository at this point in the history
…wed up in boost 1.62.0. Disable meangingless Visual Studio warnings.
  • Loading branch information
Dale Wilson committed Nov 23, 2016
1 parent a6aa098 commit b59ff13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mfast/decimal_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@
template class boost::multiprecision::backends::cpp_dec_float<18>;

#if BOOST_VERSION >= 106200

#include <boost/functional/hash.hpp>

#if defined(_MSC_VER)
#pragma warning(disable: 4667) // no function template defined that matches forced instantiation
#else
// This doesn't work in MSVC, but apparently it isn't needed.
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&);
#endif
template void boost::hash_combine<bool>(unsigned long&, bool const&);
template void boost::hash_combine<int>(unsigned long&, int const&);
template void boost::hash_combine<unsigned int>(unsigned long&, unsigned int const&);
Expand Down
1 change: 1 addition & 0 deletions src/mfast/field_instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifdef _MSC_VER
#pragma warning(disable : 4275) // non dll-interface class used as base for
// dll-interface class
#pragma warning(disable : 4996) // Microsoft deprecates C++ standard library.
#endif //_MSC_VER

#include "instructions/int_instructions.h"
Expand Down

0 comments on commit b59ff13

Please sign in to comment.