lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5013785 2/2: Replace boost with std enable_if


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5013785 2/2: Replace boost with std enable_if
Date: Sun, 22 Jan 2017 21:44:54 +0000 (UTC)

branch: master
commit 50137855e0706052d60f378fbc035e8f99dc9c61
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Replace boost with std enable_if
    
    See:
      http://lists.nongnu.org/archive/html/lmi/2017-01/msg00111.html
---
 contains.hpp          |    5 ++---
 input_seq_helpers.hpp |    4 +---
 xml_serializable.tpp  |    5 ++---
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/contains.hpp b/contains.hpp
index a88e1b9..3b8e779 100644
--- a/contains.hpp
+++ b/contains.hpp
@@ -24,9 +24,8 @@
 
 #include "config.hpp"
 
-#include <boost/utility/enable_if.hpp>
-
 #include <algorithm>                    // std::find()
+#include <type_traits>                  // std::enable_if
 
 /// Determine whether a class has a find() member.
 ///
@@ -70,7 +69,7 @@ template<typename T>
 bool contains
     (T const& t
     ,typename T::value_type const& element
-    ,typename boost::disable_if<has_member_find<T> >::type* = nullptr
+    ,typename std::enable_if<!has_member_find<T>::value>::type* = nullptr
     )
 {
     return t.end() != std::find(t.begin(), t.end(), element);
diff --git a/input_seq_helpers.hpp b/input_seq_helpers.hpp
index 246feb9..c940545 100644
--- a/input_seq_helpers.hpp
+++ b/input_seq_helpers.hpp
@@ -30,8 +30,6 @@
 #include "so_attributes.hpp"
 #include "tn_range.hpp"
 
-#include <boost/utility/enable_if.hpp>
-
 #include <map>
 #include <string>
 #include <type_traits>
@@ -104,7 +102,7 @@ namespace detail
 template<typename T>
 std::vector<T> convert_vector_type
     (std::vector<mc_enum<T> > const& ve
-    ,typename boost::enable_if<std::is_enum<T> >::type* = nullptr
+    ,typename std::enable_if<std::is_enum<T>::value>::type* = nullptr
     )
 {
     std::vector<T> z;
diff --git a/xml_serializable.tpp b/xml_serializable.tpp
index 9729c5a..d8a62d0 100644
--- a/xml_serializable.tpp
+++ b/xml_serializable.tpp
@@ -28,7 +28,6 @@
 #include "xml_lmi.hpp"
 
 #include <boost/filesystem/convenience.hpp> // basename()
-#include <boost/utility/enable_if.hpp>
 
 #include <xmlwrapp/nodes_view.h>
 
@@ -205,7 +204,7 @@ std::string const& xml_serializable<T>::xml_root_name() 
const
 template<typename X, typename Y>
 inline Y sfinae_cast
     (X const& x
-    ,typename boost::enable_if<std::is_same<X,Y> >::type* = nullptr
+    ,typename std::enable_if<std::is_same<X,Y>::value>::type* = nullptr
     )
 {
     return x;
@@ -214,7 +213,7 @@ inline Y sfinae_cast
 template<typename X, typename Y>
 inline Y sfinae_cast
     (X const&
-    ,typename boost::disable_if<std::is_same<X,Y> >::type* = nullptr
+    ,typename std::enable_if<!std::is_same<X,Y>::value>::type* = nullptr
     )
 {
     fatal_error() << "Impermissible type conversion." << LMI_FLUSH;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]