id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9511,Non-static data member,Bjorn Reese ,Peder Holt,"Consider the following example: {{{ void foo(int value) {} struct alpha { int value; typedef BOOST_TYPEOF(foo(value)) return_type; }; }}} This example compiles just fine with g++, but with clang++ it only works if compiled with -std=c++11, otherwise it gives the error message below. I believe that clang is correct (this diagnostics was [https://llvm.org/viewvc/llvm-project?view=revision&revision=154073 added] in clang 3.1.) Is this a bug in Boost.Typeof or is it expected behavior? Is there a workaround for it? The error message is: {{{ /home/breese/src/treediff/treediff/main.cpp:17:30: error: invalid use of non-static data member 'value' typedef BOOST_TYPEOF(foo(value)) return_type; ^~~~~ /usr/local/include/boost/typeof/native.hpp:41:76: note: expanded from macro 'BOOST_TYPEOF' #define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr)) ^ 1 error generated. }}} ",Bugs,closed,To Be Determined,typeof,Boost 1.54.0,Problem,invalid,,