mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-20 11:46:36 +02:00
update nlohmann::json to 3.10.4
This commit is contained in:
23
external/json/include/nlohmann/ordered_map.hpp
vendored
23
external/json/include/nlohmann/ordered_map.hpp
vendored
@ -1,10 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional> // less
|
||||
#include <initializer_list> // initializer_list
|
||||
#include <iterator> // input_iterator_tag, iterator_traits
|
||||
#include <memory> // allocator
|
||||
#include <stdexcept> // for out_of_range
|
||||
#include <type_traits> // enable_if, is_convertible
|
||||
#include <utility> // pair
|
||||
#include <vector> // vector
|
||||
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
|
||||
namespace nlohmann
|
||||
{
|
||||
|
||||
@ -64,7 +70,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||
}
|
||||
}
|
||||
|
||||
throw std::out_of_range("key not found");
|
||||
JSON_THROW(std::out_of_range("key not found"));
|
||||
}
|
||||
|
||||
const T& at(const Key& key) const
|
||||
@ -77,7 +83,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||
}
|
||||
}
|
||||
|
||||
throw std::out_of_range("key not found");
|
||||
JSON_THROW(std::out_of_range("key not found"));
|
||||
}
|
||||
|
||||
size_type erase(const Key& key)
|
||||
@ -166,6 +172,19 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||
Container::push_back(value);
|
||||
return {--this->end(), true};
|
||||
}
|
||||
|
||||
template<typename InputIt>
|
||||
using require_input_iter = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIt>::iterator_category,
|
||||
std::input_iterator_tag>::value>::type;
|
||||
|
||||
template<typename InputIt, typename = require_input_iter<InputIt>>
|
||||
void insert(InputIt first, InputIt last)
|
||||
{
|
||||
for (auto it = first; it != last; ++it)
|
||||
{
|
||||
insert(*it);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace nlohmann
|
||||
|
Reference in New Issue
Block a user