1
0
forked from boostorg/mp11

Retain mp_invoke for compatibility, mark as deprecated

This commit is contained in:
Peter Dimov
2019-01-07 04:34:01 +02:00
parent e5d6e0d0b9
commit 72279a5b2e
2 changed files with 21 additions and 8 deletions

View File

@@ -1,12 +1,12 @@
#ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
#define BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED
// Copyright 2016, 2018 Peter Dimov.
// Copyright 2016, 2018, 2019 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
// 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
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
// BOOST_MP11_WORKAROUND
@@ -121,4 +121,14 @@
# endif
#endif
// BOOST_MP11_DEPRECATED(msg)
#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
# define BOOST_MP11_DEPRECATED(msg)
#elif BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 50000 )
# define BOOST_MP11_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
# define BOOST_MP11_DEPRECATED(msg) [[deprecated(msg)]]
#endif
#endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED

View File

@@ -1,12 +1,12 @@
#ifndef BOOST_MP11_UTILITY_HPP_INCLUDED
#define BOOST_MP11_UTILITY_HPP_INCLUDED
// Copyright 2015, 2017 Peter Dimov.
// Copyright 2015, 2017, 2019 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
// 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
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/mp11/integral.hpp>
#include <boost/mp11/detail/config.hpp>
@@ -209,6 +209,9 @@ template<class Q, class... T> using mp_invoke_q = typename Q::template fn<T...>;
#endif
// old name for mp_invoke_q retained for compatibility, but deprecated
template<class Q, class... T> using mp_invoke BOOST_MP11_DEPRECATED("please use mp_invoke_q") = mp_invoke_q<Q, T...>;
} // namespace mp11
} // namespace boost