Can the following be done in a single line?
typedef BOOST_TYPEOF(generator) G;
typename G::value_type next;
typename BOOST_TYPEOF(generator)::value_type next; //does not compile
thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try to use
mpl::identityThe macro is probably expanding to some compiler intrinsics like
__typeof__(...)which aren’t necessarily eligible to appear as nested name specifier. Even the C++0x proposeddecltype(...)initially wasn’t allowed before a::, but is in the FCD.