[Boost-bugs] [Boost C++ Libraries] #10793: Compilation errors in Visual Studio 2013 with /Za (disabled extensions)

Subject: [Boost-bugs] [Boost C++ Libraries] #10793: Compilation errors in Visual Studio 2013 with /Za (disabled extensions)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-14 20:48:44


#10793: Compilation errors in Visual Studio 2013 with /Za (disabled extensions)
------------------------------+------------------------
 Reporter: adam.f.badura@… | Owner: lcaminiti
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: scope_exit
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 Use of Scope Exit generates compilation errors in Visual Studio 2013
 (version 18.00.31101 for x86) if `/Za` option (disabled language
 extensions) is used.

 I haven't checked other VS versions. I haven't checked previous Boost
 versions. And `/Za` is not set by default (language extensions are enabled
 by default).

 With `BOOST_SCOPE_EXIT_ALL` we get following errors:
 {{{
 C:\Users\Adam Badura\Dropbox\Projekty\scope_exit>cl /EHsc /Za
 /I"C:\Programming\boost_1_57_0" BOOST_SCOPE_EXIT_ALL.cpp
 Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
 Copyright (C) Microsoft Corporation. All rights reserved.

 BOOST_SCOPE_EXIT_ALL.cpp
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2143:
 syntax error : missing ';' before '<'
         C:\Programming\boost_1_57_0\boost/scope_exit.hpp(427) : see
 reference to class template instantiation
 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type<ID,T>' being
 compiled
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2913:
 explicit specialization;
 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type<ID,boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type_default_param>::id2type_impl'
 is not a specialization of a class template
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2059:
 syntax error : '<'
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2334:
 unexpected token(s) preceding '{'; skipping apparent function body
 }}}

 With `BOOST_SCOPE_EXIT` we get following errors:
 {{{
 C:\Users\Adam Badura\Dropbox\Projekty\scope_exit>cl /EHsc /Za
 /I"C:\Programming\boost_1_57_0" BOOST_SCOPE_EXIT.cpp
 Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
 Copyright (C) Microsoft Corporation. All rights reserved.

 BOOST_SCOPE_EXIT.cpp
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2143:
 syntax error : missing ';' before '<'
         C:\Programming\boost_1_57_0\boost/scope_exit.hpp(427) : see
 reference to class template instantiation
 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type<ID,T>' being
 compiled
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2913:
 explicit specialization;
 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type<ID,boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type_default_param>::id2type_impl'
 is not a specialization of a class template
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2059:
 syntax error : '<'
 C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2334:
 unexpected token(s) preceding '{'; skipping apparent function body
 BOOST_SCOPE_EXIT.cpp(9) : warning C4003: not enough actual parameters for
 macro 'BOOST_PP_EXPAND_I'
 }}}

 Note that in case of `BOOST_SCOPE_EXIT` we also get warning C4003. And it
 shows in clean build (without `/Za`) as well.

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