diff --git a/include/boost/fusion/support/unused.hpp b/include/boost/fusion/support/unused.hpp index 964839ab..1f65015e 100644 --- a/include/boost/fusion/support/unused.hpp +++ b/include/boost/fusion/support/unused.hpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2018 Kohei Takahashi 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) @@ -10,7 +11,6 @@ #include #include -#include #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable: 4522) // multiple assignment operators specified warning @@ -23,9 +23,16 @@ namespace boost { namespace fusion struct unused_type { BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - unused_type() BOOST_NOEXCEPT + BOOST_DEFAULTED_FUNCTION( + unused_type() BOOST_NOEXCEPT, { - } + }) + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_DEFAULTED_FUNCTION( + unused_type(unused_type const&) BOOST_NOEXCEPT, + { + }) template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED @@ -33,35 +40,12 @@ namespace boost { namespace fusion { } - template - BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED - unused_type const& - operator=(T const&) const BOOST_NOEXCEPT - { - return *this; - } - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - unused_type& - operator=(T const&) BOOST_NOEXCEPT - { - return *this; - } - BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED unused_type const& operator=(unused_type const&) const BOOST_NOEXCEPT { return *this; } - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - unused_type& - operator=(unused_type const&) BOOST_NOEXCEPT - { - return *this; - } }; BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type();