Fix compilation for xcode 9.x

This commit is contained in:
Agustín F. Pozuelo 2020-07-03 01:44:18 +01:00
parent 93770467a1
commit 25f5d75e6e
3 changed files with 7 additions and 3 deletions

View file

@ -61,7 +61,7 @@ uses the standard template types.
*/
using json = basic_json<>;
template<class Key, class T, class IgnoredLess, class Allocator, class Container>
template<class Key, class T, class IgnoredLess, class Allocator>
struct ordered_map;
/*!

View file

@ -22,11 +22,13 @@ struct ordered_map : std::vector<std::pair<const Key, T>, Allocator>
using typename Container::value_type;
// Explicit constructors instead of `using Container::Container`
// otherwise older compilers like GCC 5.5 choke on it
// otherwise older compilers choke on it (GCC <= 5.5, xcode <= 9.4)
ordered_map(const Allocator& alloc = Allocator()) : Container{alloc} {}
template <class It>
ordered_map(It first, It last, const Allocator& alloc = Allocator())
: Container{first, last, alloc} {}
ordered_map(std::initializer_list<T> init, const Allocator& alloc = Allocator() )
: Container{init, alloc} {}
std::pair<iterator, bool> emplace(key_type&& key, T&& t)
{

View file

@ -15891,11 +15891,13 @@ struct ordered_map : std::vector<std::pair<const Key, T>, Allocator>
using typename Container::value_type;
// Explicit constructors instead of `using Container::Container`
// otherwise older compilers like GCC 5.5 choke on it
// otherwise older compilers choke on it (GCC <= 5.5, xcode <= 9.4)
ordered_map(const Allocator& alloc = Allocator()) : Container{alloc} {}
template <class It>
ordered_map(It first, It last, const Allocator& alloc = Allocator())
: Container{first, last, alloc} {}
ordered_map(std::initializer_list<T> init, const Allocator& alloc = Allocator() )
: Container{init, alloc} {}
std::pair<iterator, bool> emplace(key_type&& key, T&& t)
{