This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
IDE highlights 'typename mpl::eval_if_c' line as wrong (code from /export/new_projects/boost_1_33_1/boost/aligned_storage.hpp): #include <cstring> namespace detail { union max_align { int t1; int t2; }; } namespace mpl { template<bool C, typename F1/*, typename F2*/> struct eval_if_c { int i; }; template<typename T> struct identity { int i; }; } template < std::size_t size_ , std::size_t alignment_ > struct aligned_storage_imp { union data_t { char buf[10]; typename mpl::eval_if_c< alignment_ == std::size_t(-1) , mpl::identity<detail::max_align> // , type_with_alignment<alignment_> >::type align_; } data_; }; int main() { return 0; }
The cause of this issue is "template_argument" rule in our grammar. It allows only "shift_expression" as argument, not a more general "assignment_expression". But expression "alignment_ == std::size_t(-1)" can't be matched by "shift_expression", and the parser fails. There is a simple workaround. If you want to pass complex expression as template argument, enclose it in parentheses. The following declaration is accepted by our parser: typename mpl::eval_if_c< (alignment_ == std::size_t(-1)) , mpl::identity<detail::max_align> >::type align_;
*** This issue has been marked as a duplicate of 138216 ***