From 74b5bea140a86e052c572a3e820a735b81d09fb1 Mon Sep 17 00:00:00 2001
From: jzmaddock
Date: Thu, 17 Jul 2014 13:21:19 +0100
Subject: [PATCH 01/12] Partially revert "Fixes for msvc-13."
This reverts commit e69dd6740a420473a73231d997cb621072e32230.
---
include/boost/type_traits/intrinsics.hpp | 4 ++--
include/boost/type_traits/is_nothrow_move_assignable.hpp | 9 ---------
.../boost/type_traits/is_nothrow_move_constructible.hpp | 9 ---------
3 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp
index 4bcfd3c..94dbea2 100644
--- a/include/boost/type_traits/intrinsics.hpp
+++ b/include/boost/type_traits/intrinsics.hpp
@@ -109,8 +109,8 @@
// # define BOOST_ALIGNMENT_OF(T) __alignof(T)
# if defined(_MSC_VER) && (_MSC_VER >= 1700)
-# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::boost::is_pod::value) && !::boost::is_volatile::value && !::boost::is_reference::value)
-# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && !::boost::is_reference::value)
+# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || __is_pod(T)) && !::boost::is_volatile::value && !::boost::is_reference::value)
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || __is_pod(T)) && ! ::boost::is_const::value && !::boost::is_volatile::value && !::boost::is_reference::value)
# endif
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
diff --git a/include/boost/type_traits/is_nothrow_move_assignable.hpp b/include/boost/type_traits/is_nothrow_move_assignable.hpp
index 9188c6c..5a3427f 100644
--- a/include/boost/type_traits/is_nothrow_move_assignable.hpp
+++ b/include/boost/type_traits/is_nothrow_move_assignable.hpp
@@ -51,15 +51,6 @@ struct is_nothrow_move_assignable_imp{
>::value));
};
-#ifdef BOOST_NO_NOEXCEPT
-//
-// The above logic doesn't quite work in the absense of noexcept,
-// this is really to improve things with VC13:
-//
-template
-struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); };
-#endif
-
#else
template
diff --git a/include/boost/type_traits/is_nothrow_move_constructible.hpp b/include/boost/type_traits/is_nothrow_move_constructible.hpp
index c7218be..bc7fb88 100644
--- a/include/boost/type_traits/is_nothrow_move_constructible.hpp
+++ b/include/boost/type_traits/is_nothrow_move_constructible.hpp
@@ -66,15 +66,6 @@ struct is_nothrow_move_constructible_imp{
#endif
-#ifdef BOOST_NO_NOEXCEPT
-//
-// The above logic doesn't quite work in the absense of noexcept,
-// this is really to improve things with VC13:
-//
-template
-struct is_nothrow_move_constructible_imp{ BOOST_STATIC_CONSTANT(bool, value = false); };
-#endif
-
}
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp::value)
From 9b3c90a32015441a4ed316f7b9c265ed44b71a38 Mon Sep 17 00:00:00 2001
From: K-ballo
Date: Fri, 18 Jul 2014 21:57:34 -0300
Subject: [PATCH 02/12] Fixed typo varaible -> variable
---
.../reference/is_nothrow_move_assignable.html | 4 ++--
.../reference/is_nothrow_move_constructible.html | 2 +-
doc/is_nothrow_move_assignable.qbk | 4 ++--
doc/is_nothrow_move_constructible.qbk | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html b/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html
index 9fd6f8f..29b804f 100644
--- a/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html
+++ b/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html
@@ -40,8 +40,8 @@
In other words, inherits from true_type
- only if expression varaible1=std::move(varaible2) won't throw (varaible1
- and varaible2 are variables
+ only if expression variable1=std::move(variable2) won't throw (variable1
+ and variable2 are variables
of type T).
In other words, inherits from true_type
- only if expression T(std::move(varaible1)) won't throw (varaible1
+ only if expression T(std::move(variable1)) won't throw (variable1
is a variable of type T).
diff --git a/doc/is_nothrow_move_assignable.qbk b/doc/is_nothrow_move_assignable.qbk
index 107f660..5e0edb9 100644
--- a/doc/is_nothrow_move_assignable.qbk
+++ b/doc/is_nothrow_move_assignable.qbk
@@ -16,8 +16,8 @@ or a type without move assignment-operator but with non-throwing assignment-oper
then inherits from __true_type, otherwise inherits from __false_type. Type `T`
must be a complete type.
-In other words, inherits from __true_type only if expression `varaible1 = std::move(varaible2)`
-won't throw (`varaible1` and `varaible2` are variables of type `T`).
+In other words, inherits from __true_type only if expression `variable1 = std::move(variable2)`
+won't throw (`variable1` and `variable2` are variables of type `T`).
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
diff --git a/doc/is_nothrow_move_constructible.qbk b/doc/is_nothrow_move_constructible.qbk
index 797af4c..863054b 100644
--- a/doc/is_nothrow_move_constructible.qbk
+++ b/doc/is_nothrow_move_constructible.qbk
@@ -16,8 +16,8 @@ or a type without move-constructor but with non-throwing copy-constructor,
then inherits from __true_type, otherwise inherits from __false_type. Type `T`
must be a complete type.
-In other words, inherits from __true_type only if expression `T(std::move(varaible1))`
-won't throw (`varaible1` is a variable of type `T`).
+In other words, inherits from __true_type only if expression `T(std::move(variable1))`
+won't throw (`variable1` is a variable of type `T`).
__compat If the compiler does not support partial-specialization of class
templates, then this template can not be used with function types.
From dea1f79512dc43e405cd2f0cd303c52510b61d06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?=
Date: Mon, 18 Aug 2014 01:09:13 +0200
Subject: [PATCH 03/12] Fix for MSVC 12.0 std::is_copy_constructible and
boost::is_copy_constructible return true for types with deleted copy
constructors
---
include/boost/type_traits/is_copy_constructible.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/boost/type_traits/is_copy_constructible.hpp b/include/boost/type_traits/is_copy_constructible.hpp
index e90ecb7..24f5eeb 100644
--- a/include/boost/type_traits/is_copy_constructible.hpp
+++ b/include/boost/type_traits/is_copy_constructible.hpp
@@ -32,7 +32,10 @@ struct is_copy_constructible_impl2 {
// error: function *function_name* cannot be referenced -- it is a deleted function
// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0);
// ^
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION)
+//
+// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
+// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800)
#ifdef BOOST_NO_CXX11_DECLTYPE
template
From d11a87472a2c4dbdacb54eb17c9b51da72bbca5c Mon Sep 17 00:00:00 2001
From: Daniel James
Date: Mon, 18 Aug 2014 15:11:59 +0100
Subject: [PATCH 04/12] Add metadata file.
---
meta/libraries.json | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 meta/libraries.json
diff --git a/meta/libraries.json b/meta/libraries.json
new file mode 100644
index 0000000..97fcb65
--- /dev/null
+++ b/meta/libraries.json
@@ -0,0 +1,18 @@
+{
+ "key": "type_traits",
+ "name": "Type Traits",
+ "authors": [
+ "John Maddock, Steve Cleary, et al"
+ ],
+ "description": "Templates for fundamental properties of types.",
+ "std": [
+ "tr1"
+ ],
+ "category": [
+ "Generic",
+ "Metaprogramming"
+ ],
+ "maintainers": [
+ "John Maddock "
+ ]
+}
From 5d936acc05e79f60bae84e4c61d46aee759c93c7 Mon Sep 17 00:00:00 2001
From: K-ballo
Date: Mon, 11 Aug 2014 09:43:28 -0300
Subject: [PATCH 05/12] Added is_final type trait. Added BOOST_IS_FINAL
intrinsic.
---
doc/html/boost_typetraits/intrinsics.html | 18 ++-
doc/html/boost_typetraits/reference.html | 1 +
.../boost_typetraits/reference/is_enum.html | 6 +-
.../boost_typetraits/reference/is_final.html | 105 ++++++++++++++++++
.../reference/is_floating_point.html | 6 +-
doc/html/index.html | 1 +
doc/html/index/s11.html | 3 +-
doc/html/index/s12.html | 2 +-
doc/html/index/s13.html | 9 +-
doc/html/index/s14.html | 17 ++-
doc/intrinsics.qbk | 4 +-
doc/is_final.qbk | 47 ++++++++
doc/type_traits.qbk | 2 +
include/boost/type_traits/intrinsics.hpp | 6 +
include/boost/type_traits/is_final.hpp | 41 +++++++
test/is_final_test.cpp | 72 ++++++++++++
test/test.hpp | 5 +
17 files changed, 333 insertions(+), 12 deletions(-)
create mode 100644 doc/html/boost_typetraits/reference/is_final.html
create mode 100644 doc/is_final.qbk
create mode 100644 include/boost/type_traits/is_final.hpp
create mode 100644 test/is_final_test.cpp
diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html
index 2458b75..80d5626 100644
--- a/doc/html/boost_typetraits/intrinsics.html
+++ b/doc/html/boost_typetraits/intrinsics.html
@@ -38,6 +38,9 @@
for all types (but all have safe fallback positions if this support is unavailable):