I’m using phoenix::bind and receiving this error message:
error C2039: ‘bind’ : is not a member
of ‘phoenix’
The code line where I’m using bind and where the error is pointing is:
phoenix::bind(
&OptionalInputPort::eraseDataEditor )
( phoenix::var( *optionalPort ) )
and I can’t figure out what is the problem.
the phoenix include is this line: #include boost/spirit/home/phoenix.hpp
Thanks.
The
phoenixnamespace is inside theboostnamespace (just like everything else in Boost).To avoid all that typing, you could preface your C++ file with this to create a namespace alias:
Then your original code should work. If you’re using
binda lot, you could tell your compiler that when you saybind, you mean the one inboost::phoenix:If you’re using lots of stuff from Phoenix, you could just bring in everything from that namespace, although that can have unintended consequences since it will include the stuff that you didn’t even know existed, and that could interfere with your own code.