[Boost-bugs] [Boost C++ Libraries] #3411: Warnings when boost::exception is compiled with "-Wold-style-cast"

Subject: [Boost-bugs] [Boost C++ Libraries] #3411: Warnings when boost::exception is compiled with "-Wold-style-cast"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-07 10:10:37


#3411: Warnings when boost::exception is compiled with "-Wold-style-cast"
---------------------------------+------------------------------------------
 Reporter: c-rom (-at-) gmx.de | Owner: emildotchevski
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: exception
  Version: Boost 1.40.0 | Severity: Cosmetic
 Keywords: old-style-cast |
---------------------------------+------------------------------------------
 Boost::exception reports warnings when compiled with "-Wold-style-cast".

 Please see ticket #2983 which is very similar to this one.

 The following code example reproduces the issue with Boost 1.40:

 {{{
 #include <iostream>
 #include <boost/exception.hpp>

 typedef boost::error_info<struct tag_my_info,int> my_info;

 struct my_error: virtual boost::exception, virtual std::exception { };

 void f()
 {
   throw my_error() << my_info(42);
 }

 void g()
 {
   try
   {
     f();
   }
   catch( my_error & x )
   {
     if( int const * mi=boost::get_error_info<my_info>(x) )
       std::cerr << "My info: " << *mi;
   }
 }
 }}}

 The piece of code for this bug report has been compiled with g++ (GCC)
 3.4.3:[[BR]]
 g++ -Wold-style-cast -o Example -I<PATH_TO_BOOST> Example.cpp

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3411>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC