On 10/18/07, Vinzenz 'evilissimo' Feenstra
Vinzenz 'evilissimo' Feenstra schrieb:
Chris Weed schrieb:
Hi, I can't figure out why the following code generates a compile error with gcc 3.4: Hi,
shouldn't it be:
template
typename boost::tuples::element ::type::value,T>::type foo(E e,T t) { return t.get<0>(); } Regards, Vinzenz Nevermind this wasn't the problem. Here's a working one ;)
#include
#include #include template
typename boost::tuples::element< boost::mpl::at_c ::type::value , T >::type foo(E e, T t) { return boost::get<0>(t); } int main() { typedef boost::mpl::vector_c
elements; boost::tuple<int> t(1); foo(elements(),t); }
That fixes it, but I don't see why, or what this change had to do with the error message. Thanks, Chris