mirror of
https://github.com/nlohmann/json
synced 2024-11-22 12:00:05 +00:00
Fix compilation for xcode 9.x
This commit is contained in:
parent
93770467a1
commit
25f5d75e6e
@ -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;
|
||||
|
||||
/*!
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user