forked from boostorg/bind
Use a local copy of is_same trait.
boost::core::is_same is deprecated, so use a local copy to avoid adding a dependency on Boost.TypeTraits. Use Boost.TypeTraits in tests. Also added a missing include.
This commit is contained in:
1 parent
cbd61ba5b9
commit
9493eaccad
7 files changed
+64
-27
No files matched your search
@@ -0,0 +1,36 @@
|
||||
#ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED
|
||||
#define BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED
|
||||
|
||||
// is_same<T1,T2>::value is true when T1 == T2
|
||||
//
|
||||
// Copyright 2014 Peter Dimov
|
||||
//
|
||||
// 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
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace _bi
|
||||
{
|
||||
|
||||
template< class T1, class T2 > struct is_same
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( bool, value = false );
|
||||
};
|
||||
|
||||
template< class T > struct is_same< T, T >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( bool, value = true );
|
||||
};
|
||||
|
||||
} // namespace _bi
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED
|
||||
@@ -22,6 +22,7 @@
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/ref.hpp>
|
||||
|
||||
#if BOOST_CXX_VERSION >= 201700L
|
||||
#include <functional>
|
||||
|
||||
Reference in new issue
Block a user