mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 20:37:22 +02:00
Merge branch 'develop'
This commit is contained in:
@ -14,53 +14,53 @@ namespace boost {
|
||||
#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
||||
template <typename... Ts>
|
||||
inline void ignore_unused(Ts const& ...)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...)
|
||||
{}
|
||||
|
||||
template <typename... Ts>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
#else
|
||||
|
||||
template <typename T1>
|
||||
inline void ignore_unused(T1 const&)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&)
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline void ignore_unused(T1 const&, T2 const&)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&)
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
inline void ignore_unused(T1 const&, T2 const&, T3 const&)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&)
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
inline void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&)
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
inline void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&)
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&)
|
||||
{}
|
||||
|
||||
template <typename T1>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
inline void ignore_unused()
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
|
||||
{}
|
||||
|
||||
#endif
|
||||
|
@ -24,11 +24,15 @@ template<class T> T * get_pointer(T * p)
|
||||
|
||||
// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
|
||||
|
||||
#if !defined( BOOST_NO_AUTO_PTR )
|
||||
|
||||
template<class T> T * get_pointer(std::auto_ptr<T> const& p)
|
||||
{
|
||||
return p.get();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_SMART_PTR )
|
||||
|
||||
template<class T> T * get_pointer( std::unique_ptr<T> const& p )
|
||||
|
@ -6,6 +6,12 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
BOOST_CXX14_CONSTEXPR int test_fun(int a)
|
||||
{
|
||||
boost::ignore_unused(a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@ -60,5 +66,10 @@ int main()
|
||||
boost::ignore_unused<a, b, c, d, e>();
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_CXX14_CONSTEXPR const int a = test_fun(0);
|
||||
boost::ignore_unused(a);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user