
4 Apr
2012
4 Apr
'12
3:42 a.m.
The int& held in the tuple will always be mutable regardless if the holder tuple is const, that is why it works. I don't know what else you are doing with forward_as_tuple.
But I thought since this overload is provided for get: template< std::size_t I, class... Types > typename std::tuple_element<I, tuple<Types...> >::type const& get( const tuple<Types...>& t ); Then it would add const to the reference. Also, forward_as_tuple is just the std::forward_as_tuple. Thanks, Paul Fultz II