headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
340 stars 101 forks source link

multiple declarations of _1 and _2 placeholders. #138

Closed mamoll closed 10 years ago

mamoll commented 10 years ago

When including odeint.hpp in several cpp files that are compiled in C++-03 mode and linked into one library or executable, boost/numeric/odeint/util/bind.hpp defines multiple instances of _1 and _2.

mamoll commented 10 years ago

This error occurs with boost 1.56. I am using clang (latest Xcode) on OS X 10.9.

mariomulansky commented 10 years ago

I've added an unnamed namespace around the placeholder definition in our bind.hpp. I'm in holidays right now so I don't have the motivation to create a test case - maybe you can check if this solves your problem?

mamoll commented 10 years ago

This fixes it. Thanks!