Rename tp_identity to type_identity; add copy_cv.hpp and type_identity.hpp to type_traits.hpp.

This commit is contained in:
Peter Dimov
2015-06-07 22:18:49 +03:00
parent 2b957cfd55
commit 3d3463b639
4 changed files with 9 additions and 8 deletions

View File

@ -21,6 +21,7 @@
#include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/common_type.hpp"
#include "boost/type_traits/conditional.hpp"
#include "boost/type_traits/copy_cv.hpp"
#include "boost/type_traits/decay.hpp"
#include "boost/type_traits/extent.hpp"
#include "boost/type_traits/floating_point_promotion.hpp"
@ -91,6 +92,7 @@
#include "boost/type_traits/remove_pointer.hpp"
#include "boost/type_traits/remove_reference.hpp"
#include "boost/type_traits/remove_volatile.hpp"
#include "boost/type_traits/type_identity.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
#include "boost/type_traits/integral_promotion.hpp"

View File

@ -12,7 +12,7 @@
#include <boost/type_traits/detail/common_arithmetic_type.hpp>
#include <boost/type_traits/detail/composite_pointer_type.hpp>
#include <boost/type_traits/detail/composite_member_pointer_type.hpp>
#include <boost/type_traits/tp_identity.hpp>
#include <boost/type_traits/type_identity.hpp>
#include <boost/type_traits/is_lvalue_reference.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_union.hpp>
@ -57,12 +57,12 @@ template<class T, class U> struct common_type_impl3;
template<class T, class U> struct common_type_class: public boost::conditional<
boost::is_convertible<T, U>::value && !boost::is_convertible<U, T>::value,
boost::tp_identity<U>,
boost::type_identity<U>,
typename boost::conditional<
boost::is_convertible<U, T>::value && !boost::is_convertible<T, U>::value,
boost::tp_identity<T>,
boost::type_identity<T>,
common_type_impl3<T, U>
>::type

View File

@ -10,7 +10,6 @@
//
#include <boost/type_traits/copy_cv.hpp>
#include <boost/type_traits/tp_identity.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_void.hpp>

View File

@ -1,5 +1,5 @@
#ifndef BOOST_TYPE_TRAITS_TP_IDENTITY_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_TP_IDENTITY_HPP_INCLUDED
#ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED
//
// Copyright 2015 Peter Dimov
@ -12,11 +12,11 @@
namespace boost
{
template<class T> struct tp_identity
template<class T> struct type_identity
{
typedef T type;
};
} // namespace boost
#endif // #ifndef BOOST_TYPE_TRAITS_TP_IDENTITY_HPP_INCLUDED
#endif // #ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED