From 754eaae8e5fae4c0fb00265180b832aab1fdf736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 3 Jan 2019 00:07:21 +0100 Subject: [PATCH] Default disable/enable_if to a nat type instead of void, as many SFINAE expressions in funcions default to void *values that are valid parameters. --- doc/move.qbk | 8 ++++++++ include/boost/move/detail/meta_utils_core.hpp | 17 +++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/doc/move.qbk b/doc/move.qbk index e75722d..eaa3c22 100644 --- a/doc/move.qbk +++ b/doc/move.qbk @@ -802,6 +802,14 @@ Special thanks to: [section:release_notes Release Notes] +[section:release_notes_boost_1_70 Boost 1.70 Release] + +* Removed support for deprecated GCC compilers. +* Fixed bugs: + * [@https://github.com/boostorg/move/pull/23 Git Pull #23: ['"Add minimal cmake file "]]. + +[endsect] + [section:release_notes_boost_1_69 Boost 1.69 Release] * Deprecated GCC < 4.3 and MSVC < 9.0 (Visual 2008) compilers. diff --git a/include/boost/move/detail/meta_utils_core.hpp b/include/boost/move/detail/meta_utils_core.hpp index 40dbb6e..4e11673 100644 --- a/include/boost/move/detail/meta_utils_core.hpp +++ b/include/boost/move/detail/meta_utils_core.hpp @@ -27,6 +27,9 @@ namespace boost { namespace move_detail { +template +struct voider { typedef void type; }; + ////////////////////////////////////// // if_c ////////////////////////////////////// @@ -52,7 +55,9 @@ struct if_ : if_c<0 != T1::value, T2, T3> ////////////////////////////////////// // enable_if_c ////////////////////////////////////// -template +struct enable_if_nat{}; + +template struct enable_if_c { typedef T type; @@ -64,13 +69,13 @@ struct enable_if_c {}; ////////////////////////////////////// // enable_if ////////////////////////////////////// -template +template struct enable_if : enable_if_c {}; ////////////////////////////////////// // disable_if_c ////////////////////////////////////// -template +template struct disable_if_c : enable_if_c {}; @@ -78,7 +83,7 @@ struct disable_if_c ////////////////////////////////////// // disable_if ////////////////////////////////////// -template +template struct disable_if : enable_if_c {}; ////////////////////////////////////// @@ -117,13 +122,13 @@ struct is_same ////////////////////////////////////// // enable_if_same ////////////////////////////////////// -template +template struct enable_if_same : enable_if, R> {}; ////////////////////////////////////// // disable_if_same ////////////////////////////////////// -template +template struct disable_if_same : disable_if, R> {}; } //namespace move_detail {