Remove use of 'boost/type_traits.h'

This commit is contained in:
Matt Blair 2015-04-27 17:14:42 -04:00
parent 3d3c468ddb
commit 7995295038

View File

@ -9,7 +9,7 @@
#include "yaml-cpp/node/detail/node.h"
#include "yaml-cpp/node/detail/node_data.h"
#include <boost/type_traits.hpp>
#include <type_traits>
namespace YAML {
namespace detail {
@ -23,8 +23,8 @@ struct get_idx {
template <typename Key>
struct get_idx<
Key, typename boost::enable_if_c<boost::is_unsigned<Key>::value &&
!boost::is_same<Key, bool>::value>::type> {
Key, typename std::enable_if<std::is_unsigned<Key>::value &&
!std::is_same<Key, bool>::value>::type> {
static node* get(const std::vector<node*>& sequence, const Key& key,
shared_memory_holder /* pMemory */) {
return key < sequence.size() ? sequence[key] : 0;
@ -41,7 +41,7 @@ struct get_idx<
};
template <typename Key>
struct get_idx<Key, typename boost::enable_if<boost::is_signed<Key> >::type> {
struct get_idx<Key, typename std::enable_if<std::is_signed<Key>::value >::type> {
static node* get(const std::vector<node*>& sequence, const Key& key,
shared_memory_holder pMemory) {
return key >= 0 ? get_idx<std::size_t>::get(