Specify defaulted and remove unnecessary functions from unused_type

This commit is contained in:
Kohei Takahashi
2018-04-27 12:37:37 +09:00
parent 38aa3705d0
commit 0e900bba3f

View File

@ -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 <boost/fusion/support/config.hpp>
#include <iosfwd>
#include <boost/config.hpp>
#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 <typename T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
@ -33,35 +40,12 @@ namespace boost { namespace fusion
{
}
template <typename T>
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(T const&) const BOOST_NOEXCEPT
{
return *this;
}
template <typename T>
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();