[Boost-bugs] [Boost C++ Libraries] #12553: set_info_rv compile error struct vs. class

Subject: [Boost-bugs] [Boost C++ Libraries] #12553: set_info_rv compile error struct vs. class
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-26 13:32:12


#12553: set_info_rv compile error struct vs. class
------------------------------+----------------------------
 Reporter: jpettiss@… | Owner: emildotchevski
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: exception
  Version: Boost 1.62.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------------
 Under Visual Studio 2010, 2012, and 2015 (but not 2008) I see the
 following compilation errors:

 {{{
 c:\vendor\boost_1_62_0\include\boost\exception\info.hpp(206) : error
 C4099: 'boost::exception_detail::set_info_rv' : type name first seen using
 'struct' now seen using 'class'
         c:\vendor\boost_1_62_0\include\boost\exception\exception.hpp(186)
 : see declaration of 'boost::exception_detail::set_info_rv'
 c:\vendor\boost_1_62_0\include\boost\exception\info.hpp(241) : error
 C4099: 'boost::exception_detail::set_info_rv<boost::throw_function>' :
 type name first seen using 'struct' now seen using 'class'
 c:\vendor\boost_1_62_0\include\boost\exception\info.hpp(256) : error
 C4099: 'boost::exception_detail::set_info_rv<boost::throw_file>' : type
 name first seen using 'struct' now seen using 'class'
 c:\vendor\boost_1_62_0\include\boost\exception\info.hpp(271) : error
 C4099: 'boost::exception_detail::set_info_rv<boost::throw_line>' : type
 name first seen using 'struct' now seen using 'class'
 }}}

 Indeed, on line 185 of boost/exception/exception.hpp I see this (namespace
 boost::exception_detail):

 {{{
         template <class>
         struct set_info_rv;
 }}}

 And on line 205 of bost/exception/info.hpp I see this, also in the
 boost::exception_detail namespace:

 {{{
                 template <class T>
                 class set_info_rv;
 }}}

 There is a guard above this one on line 202:

 {{{
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
 }}}

 Which I think explains why an old compiler like Visual Studio 2008 does
 not run into this.

 Manually changing the affected definitions in info.hpp from class to
 struct fixes the problem.

 I was unable to figure out how to browse current head to see if this was
 fixed (no Browse Source tab anymore and no obvious URLs to the Git repo on
 the Git wiki pages). I'm using 1.62.0.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12553>
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:20 UTC