Merge branch 'develop' of https://github.com/boostorg/type_traits into develop

This commit is contained in:
jzmaddock committed 2018-09-14 17:41:16 +01:00
commit a5bb8d7336
34 files changed
+300 -39

No files matched your search

+1
View File
@@ -24,6 +24,7 @@
#include <boost/type_traits/copy_cv.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/enable_if.hpp>
#include <boost/type_traits/extent.hpp>
#include <boost/type_traits/floating_point_promotion.hpp>
#include <boost/type_traits/function_traits.hpp>
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
@@ -30,7 +30,7 @@ struct is_likely_stateless_lambda : public false_type {};
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
#include <boost/type_traits/is_convertible.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/enable_if.hpp>
namespace boost{
@@ -70,7 +70,7 @@ struct is_likely_stateless_lambda : false_type{};
template<typename T>
struct is_likely_stateless_lambda<
T,
typename boost::enable_if_c<has_one_operator_call<T>::value>::type> :
typename boost::enable_if_<has_one_operator_call<T>::value>::type> :
boost::is_convertible<T, typename equivalent_function_pointer<T>::type
>{};
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
+37
View File
@@ -0,0 +1,37 @@
/*
Copyright 2003 The Trustees of Indiana University
Authors: Jaakko Jarvi (jajarvi at osl.iu.edu)
Jeremiah Willcock (jewillco at osl.iu.edu)
Andrew Lumsdaine (lums at osl.iu.edu)
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
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)
*/
#ifndef BOOST_TT_ENABLE_IF_HPP_INCLUDED
#define BOOST_TT_ENABLE_IF_HPP_INCLUDED
#include <boost/config.hpp>
namespace boost {
template<bool B, class T = void>
struct enable_if_ {
typedef T type;
};
template<class T>
struct enable_if_<false, T> { };
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
template<bool B, class T = void>
using enable_if_t = typename enable_if_<B, T>::type;
#endif
} /* boost */
#endif
@@ -11,8 +11,7 @@
#include <boost/config.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/is_noncopyable.hpp>
#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
&& !defined(BOOST_INTEL_CXX_VERSION) && \
@@ -112,7 +111,7 @@ struct is_copy_assignable_impl {
typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type unreferenced_t;
BOOST_STATIC_CONSTANT(bool, value = (
boost::detail::is_copy_assignable_impl2<
boost::is_base_and_derived<boost::noncopyable, T>::value
boost::is_noncopyable<T>::value
|| boost::is_const<unreferenced_t>::value || boost::is_array<unreferenced_t>::value
,T
>::value
@@ -120,7 +119,7 @@ struct is_copy_assignable_impl {
#else
BOOST_STATIC_CONSTANT(bool, value = (
boost::detail::is_copy_assignable_impl2<
boost::is_base_and_derived<boost::noncopyable, T>::value,T
boost::is_noncopyable<T>::value,T
>::value
));
#endif
@@ -37,8 +37,7 @@ template <> struct is_copy_constructible<void volatile> : public false_type{};
// an incorrect value, which just defers the issue into the users code) as well. We can at least fix
// boost::non_copyable as a base class as a special case:
//
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/is_noncopyable.hpp>
namespace boost {
@@ -50,7 +49,7 @@ namespace boost {
}
template <class T> struct is_copy_constructible : public detail::is_copy_constructible_imp<T, is_base_and_derived<boost::noncopyable, T>::value>{};
template <class T> struct is_copy_constructible : public detail::is_copy_constructible_imp<T, is_noncopyable<T>::value>{};
template <> struct is_copy_constructible<void> : public false_type{};
template <> struct is_copy_constructible<void const> : public false_type{};
@@ -64,13 +63,12 @@ namespace boost {
#else
#include <boost/type_traits/detail/yes_no_type.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/type_traits/is_noncopyable.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_rvalue_reference.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/noncopyable.hpp>
#ifdef BOOST_MSVC
#pragma warning(push)
@@ -160,7 +158,7 @@ namespace boost {
BOOST_STATIC_CONSTANT(bool, value = (
boost::detail::is_copy_constructible_impl2<
boost::is_base_and_derived<boost::noncopyable, T>::value,
boost::is_noncopyable<T>::value,
T
>::value
));
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
@@ -1,6 +1,6 @@
/*
Copyright 2017-2018 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
@@ -0,0 +1,39 @@
#ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
//
// Copyright 2018 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
//
// is_noncopyable<T> returns whether T is derived from boost::noncopyable
//
#include <boost/type_traits/is_base_and_derived.hpp>
namespace boost
{
#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
// boost::noncopyable derives from noncopyable_::base_token to enable us
// to recognize it. The definition is macro-guarded so that we can replicate
// it here without including boost/core/noncopyable.hpp, which is in Core.
namespace noncopyable_
{
struct base_token {};
}
#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
template<class T> struct is_noncopyable: is_base_and_derived<noncopyable_::base_token, T>
{
};
} // namespace boost
#endif // #ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
@@ -16,7 +16,7 @@
#include <boost/type_traits/has_nothrow_assign.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/enable_if.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/is_complete.hpp>
#include <boost/static_assert.hpp>
@@ -48,7 +48,7 @@ struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
template <class T>
struct false_or_cpp11_noexcept_move_assignable <
T,
typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
typename ::boost::enable_if_<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
> : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>
{};
@@ -35,7 +35,7 @@ template <class T> struct is_nothrow_move_constructible<const volatile T> : publ
#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
#include <boost/type_traits/declval.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/enable_if.hpp>
namespace boost{ namespace detail{
@@ -45,7 +45,7 @@ struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}
template <class T>
struct false_or_cpp11_noexcept_move_constructible <
T,
typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>::type
typename ::boost::enable_if_<sizeof(T) && BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>::type
> : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>
{};
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright 2017 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright 2017 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
(glenjofe@gmail.com)
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt