Added workaround for defaulted and noexcept

This commit is contained in:
Kohei Takahashi
2018-04-27 14:56:23 +09:00
parent 0e900bba3f
commit 5221bbbc76
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2014 Eric Niebler Copyright (c) 2014 Eric Niebler
Copyright (c) 2014 Kohei Takahashi Copyright (c) 2014,2015,2018 Kohei Takahashi
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -96,4 +96,12 @@ namespace std
#define BOOST_FUSION_CONSTEXPR_THIS BOOST_CONSTEXPR #define BOOST_FUSION_CONSTEXPR_THIS BOOST_CONSTEXPR
#endif #endif
// Workaround for GCC 4.6 that rejects defaulted function with noexcept.
#if BOOST_WORKAROUND(BOOST_GCC, / 100 == 406)
# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED
#else
# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED BOOST_NOEXCEPT
#endif
#endif #endif

View File

@ -24,13 +24,13 @@ namespace boost { namespace fusion
{ {
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
BOOST_DEFAULTED_FUNCTION( BOOST_DEFAULTED_FUNCTION(
unused_type() BOOST_NOEXCEPT, unused_type() BOOST_FUSION_NOEXCEPT_ON_DEFAULTED,
{ {
}) })
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
BOOST_DEFAULTED_FUNCTION( BOOST_DEFAULTED_FUNCTION(
unused_type(unused_type const&) BOOST_NOEXCEPT, unused_type(unused_type const&) BOOST_FUSION_NOEXCEPT_ON_DEFAULTED,
{ {
}) })