add missing includes, put back include comments

This commit is contained in:
Théo DELRIEU 2017-08-14 19:28:01 +02:00
parent 9cab30cfce
commit 57d822b6e2
No known key found for this signature in database
GPG key ID: 51AC4B3A2C47C10F
18 changed files with 123 additions and 87 deletions

View file

@ -1,10 +1,16 @@
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#include <array>
#include <tuple>
#include <utility>
#include <valarray>
#include <algorithm> // transform
#include <array> // array
#include <ciso646> // and, not
#include <forward_list> // forward_list
#include <iterator> // inserter, front_inserter, end
#include <string> // string
#include <tuple> // tuple, make_tuple
#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible
#include <utility> // pair, declval
#include <valarray> // valarray
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
@ -15,10 +21,6 @@ namespace nlohmann
{
namespace detail
{
///////////////
// from_json //
///////////////
// overloads for basic_json template parameters
template<typename BasicJsonType, typename ArithmeticType,
enable_if_t<std::is_arithmetic<ArithmeticType>::value and

View file

@ -1,9 +1,13 @@
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#include <type_traits>
#include <utility>
#include <valarray>
#include <ciso646> // or, and, not
#include <iterator> // begin, end
#include <tuple> // tuple, get
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
#include <utility> // move, forward, declval, pair
#include <valarray> // valarray
#include <vector> // vector
#include "detail/meta.hpp"
#include "detail/value_t.hpp"

View file

@ -1,11 +1,16 @@
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#include <iterator>
#include <type_traits>
#include <ciso646> // not
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
#include <type_traits> // conditional, is_const, remove_const
#include "detail/exceptions.hpp"
#include "detail/iterators/internal_iterator.hpp"
#include "detail/iterators/primitive_iterator.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
namespace nlohmann
{

View file

@ -1,8 +1,10 @@
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#include <cstddef>
#include <string>
#include <cstddef> // size_t
#include <string> // string, to_string
#include "detail/value_t.hpp"
namespace nlohmann
{

View file

@ -1,9 +1,9 @@
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#include <cstddef>
#include <iterator>
#include <utility>
#include <cstddef> // ptrdiff_t
#include <iterator> // reverse_iterator
#include <utility> // declval
namespace nlohmann
{

View file

@ -1,9 +1,10 @@
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#include <cstddef>
#include <iosfwd>
#include <limits>
#include <ciso646> // not
#include <cstddef> // ptrdiff_t
#include <limits> // numeric_limits
#include <ostream> // ostream
namespace nlohmann
{

View file

@ -1,6 +1,8 @@
#ifndef NLOHMANN_JSON_MACRO_SCOPE_HPP
#define NLOHMANN_JSON_MACRO_SCOPE_HPP
#include <ciso646> // not
// This file contains all internal macro definitions
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them

View file

@ -1,10 +1,11 @@
#ifndef NLOHMANN_JSON_DETAIL_META_HPP
#define NLOHMANN_JSON_DETAIL_META_HPP
#include <cstdint>
#include <limits>
#include <type_traits> // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type
#include <utility>
#include <ciso646> // not
#include <cstddef> // size_t
#include <limits> // numeric_limits
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
#include <utility> // declval
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"

View file

@ -1,14 +1,20 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstring>
#include <iomanip>
#include <sstream>
#include <string>
#include <utility>
#include <algorithm> // generate_n
#include <array> // array
#include <cassert> // assert
#include <cmath> // ldexp
#include <cstddef> // size_t
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
#include <cstring> // memcpy
#include <iomanip> // setw, setfill
#include <ios> // hex
#include <iterator> // back_inserter
#include <limits> // numeric_limits
#include <sstream> // stringstream
#include <string> // char_traits, string
#include <utility> // make_pair, move
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"

View file

@ -1,11 +1,11 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstring>
#include <limits>
#include <algorithm> // reverse
#include <array> // array
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
#include <cstring> // memcpy
#include <limits> // numeric_limits
#include "detail/parsing/binary_reader.hpp"
#include "detail/parsing/output_adapters.hpp"

View file

@ -1,12 +1,19 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#include <algorithm>
#include <array>
#include <cstddef>
#include <iosfwd>
#include <memory>
#include <string>
#include <algorithm> // min
#include <array> // array
#include <cassert> // assert
#include <cstddef> // size_t
#include <cstring> // strlen
#include <ios> // streamsize, streamoff, streampos
#include <istream> // istream
#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next
#include <memory> // shared_ptr, make_shared, addressof
#include <numeric> // accumulate
#include <string> // string, char_traits
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
#include <utility> // pair, declval
#include "detail/macro_scope.hpp"

View file

@ -1,9 +1,15 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#include <clocale>
#include <cstddef>
#include <vector>
#include <clocale> // localeconv
#include <cstddef> // size_t
#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull
#include <initializer_list> // initializer_list
#include <ios> // hex, uppercase
#include <iomanip> // setw, setfill
#include <sstream> // stringstream
#include <string> // char_traits, string
#include <vector> // vector
#include "detail/macro_scope.hpp"
#include "detail/parsing/input_adapters.hpp"

View file

@ -1,12 +1,14 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#include <algorithm>
#include <cstddef>
#include <iosfwd>
#include <iterator>
#include <memory>
#include <vector>
#include <algorithm> // copy
#include <cstddef> // size_t
#include <ios> // streamsize
#include <iterator> // back_inserter
#include <memory> // shared_ptr, make_shared
#include <ostream> // basic_ostream
#include <string> // basic_string
#include <vector> // vector
namespace nlohmann
{

View file

@ -1,15 +1,18 @@
#ifndef NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#include <cmath>
#include <functional>
#include <string>
#include <utility>
#include <cassert> // assert
#include <cmath> // isfinite
#include <cstdint> // uint8_t
#include <functional> // function
#include <string> // string
#include <utility> // move
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/parsing/input_adapters.hpp"
#include "detail/parsing/lexer.hpp"
#include "detail/value_t.hpp"
namespace nlohmann
{

View file

@ -1,21 +1,24 @@
#ifndef NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#define NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#include <algorithm>
#include <array>
#include <clocale>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <iterator>
#include <limits>
#include <string>
#include <type_traits>
#include <algorithm> // reverse, remove, fill, find, none_of
#include <array> // array
#include <cassert> // assert
#include <ciso646> // and, or
#include <clocale> // localeconv, lconv
#include <cmath> // labs, isfinite, isnan, signbit
#include <cstddef> // size_t, ptrdiff_t
#include <cstdint> // uint8_t
#include <cstdio> // snprintf
#include <iterator> // next
#include <limits> // numeric_limits
#include <string> // string
#include <type_traits> // is_same
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/parsing/output_adapters.hpp"
#include "detail/value_t.hpp"
namespace nlohmann
{

View file

@ -1,6 +1,7 @@
#ifndef NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#define NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#include <array> // array
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstdint> // uint8_t
@ -37,7 +38,7 @@ value with the default value for a given type
@since version 1.0.0
*/
enum class value_t : uint8_t
enum class value_t : std::uint8_t
{
null, ///< null value
object, ///< object (unordered set of name/value pairs)
@ -62,7 +63,7 @@ Returns an ordering that is similar to Python:
*/
inline bool operator<(const value_t lhs, const value_t rhs) noexcept
{
static constexpr std::array<uint8_t, 8> order = {{
static constexpr std::array<std::uint8_t, 8> order = {{
0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */,
1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */
}

View file

@ -29,26 +29,17 @@ SOFTWARE.
#ifndef NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP
#include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform
#include <array> // array
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
#include <ciso646> // and, not, or
#include <clocale> // lconv, localeconv
#include <cmath> // isfinite, labs, ldexp, signbit
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
#include <cstdlib> // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull
#include <cstring> // memcpy, strlen
#include <forward_list> // forward_list
#include <functional> // function, hash, less
#include <functional> // hash, less
#include <initializer_list> // initializer_list
#include <iomanip> // hex
#include <iosfwd> // istream, ostream
#include <iterator> // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator
#include <limits> // numeric_limits
#include <locale> // locale
#include <iterator> // iterator_traits, random_access_iterator_tag
#include <numeric> // accumulate
#include <sstream> // stringstream
#include <utility> // declval, forward, make_pair, move, pair, swap
#include <string> // string, stoi, to_string
#include <utility> // declval, forward, move, pair, swap
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"

View file

@ -3,8 +3,8 @@
#include <cstdint> // int64_t, uint64_t
#include <map> // map
#include <memory> // addressof, allocator, allocator_traits, unique_ptr
#include <string> // getline, stoi, string, to_string
#include <memory> // allocator
#include <string> // string
#include <vector> // vector
/*!