This allows ql-1.2.1 to compile correctly under Apple LLVM 4.2 with C++11/libc++
Thanks for the patch. What was the error? Would an explicit conversion to bool work, instead of comparing to NULL?
The error is that boost [and the standard library] will disallow sp implicit conversion to bool in C++11. I tend to write the comparison against NULL idiomatically for C++<11 - pending an eventual move to C++11 nullptr.
However if you dislike the NULL comparison - any of
1 an implicit conversion from .get()
should work. It might make sense to combine this anyway with e.g. conditional selection of std::shared_ptr/dynamic_pointer_cast/ref rather than the boost types, - if you let me know what you prefer, I'll redo the patch.
Apologies for being a pain, but wouldn't an explicit conversion to bool, as in
also work? The standard library mandates an explicit operator bool(), and boost seems to implement it.
I've committed to the svn trunk a change that makes the conversion to bool explicit.
Let me know if there's still a problem with that.
Thanks again for the heads-up.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.