mirror of
https://github.com/boostorg/conversion.git
synced 2025-07-31 21:14:37 +02:00
Fix warning
`warning: catching polymorphic type ???class std::bad_cast??? by value`
This commit is contained in:
@@ -72,7 +72,7 @@ int main( int argc, char * argv[] )
|
|||||||
|
|
||||||
bool caught_exception = false;
|
bool caught_exception = false;
|
||||||
try { derived = polymorphic_cast<Derived*>( base ); }
|
try { derived = polymorphic_cast<Derived*>( base ); }
|
||||||
catch (std::bad_cast)
|
catch (const std::bad_cast&)
|
||||||
{ cout<<"caught bad_cast\n"; caught_exception = true; }
|
{ cout<<"caught bad_cast\n"; caught_exception = true; }
|
||||||
BOOST_TEST( caught_exception );
|
BOOST_TEST( caught_exception );
|
||||||
// the following is just so generated code can be inspected
|
// the following is just so generated code can be inspected
|
||||||
|
Reference in New Issue
Block a user