Of a Boost Proto expression, when should I not expect a proto_tag member? I can enquire regarding the tag type of a placeholder, say, using either of the following methods:
typedef proto::tag_of<decltype(_1)>::type ta;
typedef decltype(_1)::proto_tag tb;
But if I ask about the tag type of an expression's child, it appears that the proto_tag member is absent; and the third line of the following code gives an error:
auto f = _1 + _2;
typedef proto::tag_of<decltype(proto::child_c<0>(f))>::type tc;
typedef decltype(proto::child_c<0>(f))::proto_tag td; // error
Clang and GCC's errors report that the type in question: is not a class, namespace, or scoped enumeration. I use Clang 3.2, GCC 4.7.2, and Boost 1.53.
The error that g++ 4.8.0 gives is basically:
In order to use
::you need to have an unqualified type so you must remove the reference:I believe you could also use:
Using
proto::tag_ofyou don't need to worry about the possible reference since it is removed when it's necessary: