templatetypename T
void foo( T const )
{
}
int main()
{
boost::variantint,. v = 5;
// Here I want to pass const reference to integer value of variant to
function foo
// foo( getint( v ) ); - type T is incorrect
foo( ??? );
}
I don't see why
Gennadiy Rozental:
templatetypename T
void foo( T const )
{
}
int main()
{
boost::variantint,. v = 5;
// Here I want to pass const reference to integer value of variant
to
function foo
// foo( getint( v ) ); - type T is incorrect
foo(
Gennadiy Rozental wrote:
Also I think we need free function form of value
extraction. In other case it would be difficult to place extract
in context where template parameter is deduced. And check function
is not that important in most cases.
While I am again considering a free