mirror of
https://github.com/boostorg/variant.git
synced 2026-02-17 14:12:12 +00:00
Merge [42989] and [53187] from the trunk.
[SVN r53196]
This commit is contained in:
@@ -83,9 +83,9 @@ str += " world! ";</programlisting>
|
||||
|
||||
<programlisting>void times_two( boost::variant< int, std::string > & operand )
|
||||
{
|
||||
if ( int* pi = <functionname>boost::get</functionname><int>( &v ) )
|
||||
if ( int* pi = <functionname>boost::get</functionname><int>( &operand ) )
|
||||
*pi *= 2;
|
||||
else if ( std::string* pstr = <functionname>boost::get</functionname><std::string>( &v ) )
|
||||
else if ( std::string* pstr = <functionname>boost::get</functionname><std::string>( &operand ) )
|
||||
*pstr += *pstr;
|
||||
}</programlisting>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user