C++ Add new type vector_bool flexbuffers (#4410)

* Add new type vector_bool

* Update stl_emulation.h

Fix Is same typo

* Update stl_emulation.h
This commit is contained in:
rouzier
2017-08-14 11:44:56 -04:00
committed by Wouter van Oortmerssen
parent b4e91091ec
commit 76744a4345
3 changed files with 16 additions and 5 deletions

View File

@@ -91,11 +91,13 @@ inline void vector_emplace_back(std::vector<T> *vector, V &&data) {
#if !(defined(_MSC_VER) && _MSC_VER <= 1700 /* MSVC2012 */)
#ifndef FLATBUFFERS_CPP98_STL
template <typename T> using is_scalar = std::is_scalar<T>;
template <typename T, typename U> using is_same = std::is_same<T,U>;
template <typename T> using is_floating_point = std::is_floating_point<T>;
template <typename T> using is_unsigned = std::is_unsigned<T>;
#else
// Map C++ TR1 templates defined by stlport.
template <typename T> using is_scalar = std::tr1::is_scalar<T>;
template <typename T, typename U> using is_same = std::tr1::is_same<T,U>;
template <typename T> using is_floating_point =
std::tr1::is_floating_point<T>;
template <typename T> using is_unsigned = std::tr1::is_unsigned<T>;
@@ -103,6 +105,7 @@ inline void vector_emplace_back(std::vector<T> *vector, V &&data) {
#else
// MSVC 2010 doesn't support C++11 aliases.
template <typename T> struct is_scalar : public std::is_scalar<T> {};
template <typename T, typename U> struct is_same : public std::is_same<T,U> {};
template <typename T> struct is_floating_point :
public std::is_floating_point<T> {};
template <typename T> struct is_unsigned : public std::is_unsigned<T> {};