
Dean Michael Berris wrote:
So the idea is to use fusion::at_c<>() which I've been trying to avoid precisely because this static assert will fail:
BOOST_STATIC_ASSERT(( boost::is_same< boost::result_of<select<0>(std::pair<int, int>)>::type, int
::value ));
This I think is because Fusion's at_c<>::type will return 'int const &' which is correct behavior as far as fusion goes, but not what I intend with the current implementation of select<> which is to return copies and not references. Perhaps it's going to be good to rethink this decision, and come up with select<> and select_copy<>.
That's not a const-correctness problem. Fusion /at/ will return int& which is the correct exact type that the at(s) function returns. See my other post. Use /value_at/ if you want the actual value! :-) HTH, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net