1. Continuing with your example.cpp file, where you last inserted the
boost::detail::allocator::construct bit, please remove all usage of Boost.MultiIndex and its headers, and simply add this #include
#include <boost/detail/allocator_utilities.hpp>
and keep the boost::detail::allocator::construct portion. Still the same
" syntax error : identifier 'p'" error?
]
Yes, I still got the error.
[
2. If the answer to the above is affirmative, please start removing headers (and the code that depends on them), *one header at a time*. Continue after you've removed everything (a) or suddenly the error disappears (b).
]
The error disappears only when I remove the multi_index declaration. After which the thing is of no use to me.
[
3. If (a), then you have a barebone example.cpp file with little more than the the allocator_utilities.hpp #include and the boost::detail::allocator::construct line. My bet is then the error has to do with the settings of your project.
]
I am not sure of that but the precompiled header setting was not the reason. I confirmed this by compiling my stand alone program in both ways of the setting. It compiles fine.
[
4.If (b), examine the last header you removed when the error vanished. Is it introducing any kind of macro, ::new overload, or something suspicious?
]
No, I confirmed manually in the code and new is not overloaded.
Also one more thing, I found new now is that I am getting similar errors while I try to use boost::unordered_map. I get a "syntax error :'(' in boost\unordered\detail\buckets.hpp(767). I opened a seperate thread for that.