Skip to content

Commit

Permalink
Merge pull request #806.
Browse files Browse the repository at this point in the history
Get bind placeholders from boost::placeholders namespace.
  • Loading branch information
lballabio committed May 1, 2020
2 parents 60b2be1 + 855f352 commit f11da1e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ql/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/ref.hpp>
#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
Expand All @@ -59,6 +59,9 @@ namespace QuantLib {
using boost::ref;
using boost::cref;
namespace placeholders {
#if BOOST_VERSION >= 106000
using namespace boost::placeholders;
#else
using ::_1;
using ::_2;
using ::_3;
Expand All @@ -68,6 +71,7 @@ namespace QuantLib {
using ::_7;
using ::_8;
using ::_9;
#endif
}
#endif

Expand Down
8 changes: 7 additions & 1 deletion ql/patterns/observable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ namespace QuantLib {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif
#include <boost/bind.hpp>

#if !defined(BOOST_BIND_NO_PLACEHOLDERS)
#define BOOST_BIND_NO_PLACEHOLDERS
#include <boost/bind/bind.hpp>
#undef BOOST_BIND_NO_PLACEHOLDERS
#endif

#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4))
#pragma GCC diagnostic pop
#endif
Expand Down

0 comments on commit f11da1e

Please sign in to comment.