Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
5c04cc10
Unverified
Commit
5c04cc10
authored
Jan 13, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔨
fixed includes
parent
8e9ad346
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
9 deletions
+27
-9
Makefile
Makefile
+10
-6
to_chars.hpp
include/nlohmann/detail/conversions/to_chars.hpp
+2
-0
input_adapters.hpp
include/nlohmann/detail/input/input_adapters.hpp
+1
-0
json_sax.hpp
include/nlohmann/detail/input/json_sax.hpp
+2
-1
iter_impl.hpp
include/nlohmann/detail/iterators/iter_impl.hpp
+1
-0
json_pointer.hpp
include/nlohmann/detail/json_pointer.hpp
+1
-0
json.hpp
single_include/nlohmann/json.hpp
+10
-2
No files found.
Makefile
View file @
5c04cc10
...
@@ -36,6 +36,9 @@ CXX=clang++
...
@@ -36,6 +36,9 @@ CXX=clang++
AMALGAMATED_FILE
=
single_include/nlohmann/json.hpp
AMALGAMATED_FILE
=
single_include/nlohmann/json.hpp
# directory to recent compiler binaries
COMPILER_DIR
=
/Users/niels/Documents/projects/compilers/local/bin
# main target
# main target
all
:
all
:
@
echo
"amalgamate - amalgamate file single_include/nlohmann/json.hpp from the include/nlohmann sources"
@
echo
"amalgamate - amalgamate file single_include/nlohmann/json.hpp from the include/nlohmann sources"
...
@@ -120,7 +123,7 @@ doctest:
...
@@ -120,7 +123,7 @@ doctest:
# -Wno-c++2a-compat: u8 literals will behave differently in C++20...
# -Wno-c++2a-compat: u8 literals will behave differently in C++20...
# -Wno-padded: padding is nothing to warn about
# -Wno-padded: padding is nothing to warn about
pedantic_clang
:
pedantic_clang
:
$(MAKE)
json_unit
CXXFLAGS
=
"
\
$(MAKE)
json_unit
CXX
=
$(COMPILER_DIR)
/clang++
CXX
FLAGS
=
"
\
-std=c++11 -Wno-c++98-compat -Wno-c++98-compat-pedantic
\
-std=c++11 -Wno-c++98-compat -Wno-c++98-compat-pedantic
\
-Werror
\
-Werror
\
-Weverything
\
-Weverything
\
...
@@ -137,7 +140,7 @@ pedantic_clang:
...
@@ -137,7 +140,7 @@ pedantic_clang:
# calling GCC with most warnings
# calling GCC with most warnings
pedantic_gcc
:
pedantic_gcc
:
$(MAKE)
json_unit
CXXFLAGS
=
"
\
$(MAKE)
json_unit
CXX
=
$(COMPILER_DIR)
/g++
CXX
FLAGS
=
"
\
-std=c++11
\
-std=c++11
\
-Wno-deprecated-declarations
\
-Wno-deprecated-declarations
\
-Werror
\
-Werror
\
...
@@ -281,8 +284,8 @@ cppcheck:
...
@@ -281,8 +284,8 @@ cppcheck:
clang_analyze
:
clang_analyze
:
rm
-fr
clang_analyze_build
rm
-fr
clang_analyze_build
mkdir
clang_analyze_build
mkdir
clang_analyze_build
cd
clang_analyze_build
;
CCC_CXX
=
/Users/niels/Documents/projects/llvm-clang/local/bin/clang++ /Users/niels/Documents/projects/llvm-clang/local/bin/scan-build cmake ..
cd
clang_analyze_build
;
CCC_CXX
=
$(COMPILER_DIR)
/clang++
CXX
=
$(COMPILER_DIR)
/clang++
$(COMPILER_DIR)
/scan-build cmake ..
-GNinja
/Users/niels/Documents/projects/llvm-clang/local/bin/scan-build
-enable-checker
alpha.core.DynamicTypeChecker,alpha.core.PointerArithm,alpha.core.PointerSub,alpha.cplusplus.DeleteWithNonVirtualDtor,alpha.cplusplus.IteratorRange,alpha.cplusplus.MisusedMovedObject,alpha.security.ArrayBoundV2,alpha.core.Conversion
--use-c
++
=
/Users/niels/Documents/projects/llvm-clang/local/bin/clang++
--view
-analyze-headers
-o
clang_analyze_build/report.html make
-j10
-C
clang_analyze_build
cd
clang_analyze_build
;
$(COMPILER_DIR)
/scan-build
-enable-checker
alpha.core.BoolAssignment,alpha.core.CallAndMessageUnInitRefArg,alpha.core.CastSize,alpha.core.CastToStruct,alpha.core.Conversion,alpha.core.DynamicTypeChecker,alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,alpha.core.SizeofPtr,alpha.core.StackAddressAsyncEscape,alpha.core.TestAfterDivZero,alpha.deadcode.UnreachableCode,core.builtin.BuiltinFunctions,core.builtin.NoReturnFunctions,core.CallAndMessage,core.DivideZero,core.DynamicTypePropagation,core.NonnilStringConstants,core.NonNullParamChecker,core.NullDereference,core.StackAddressEscape,core.UndefinedBinaryOperatorResult,core.uninitialized.ArraySubscript,core.uninitialized.Assign,core.uninitialized.Branch,core.uninitialized.CapturedBlockVariable,core.uninitialized.UndefReturn,core.VLASize,cplusplus.InnerPointer,cplusplus.Move,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,cplusplus.SelfAssignment,deadcode.DeadStores,nullability.NullableDereferenced,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull
--use-c
++
=
$(COMPILER_DIR)
/clang++
--view
-analyze-headers
-o
clang_analyze_build/report.html ninja
##########################################################################
##########################################################################
# maintainer targets
# maintainer targets
...
@@ -315,10 +318,11 @@ check-amalgamation:
...
@@ -315,10 +318,11 @@ check-amalgamation:
# check if every header in nlohmann includes sufficient headers to be compiled
# check if every header in nlohmann includes sufficient headers to be compiled
# individually
# individually
check-single-includes
:
check-single-includes
:
for
x
in
$(SRCS)
;
do
\
@
for
x
in
$(SRCS)
;
do
\
echo
"Checking self-sufficiency of
$$
x..."
;
\
echo
"#include <
$$
x>
\n
int main() {}
\n
"
|
sed
's|include/||'
>
single_include_test.cpp
;
\
echo
"#include <
$$
x>
\n
int main() {}
\n
"
|
sed
's|include/||'
>
single_include_test.cpp
;
\
$(CXX)
$(CXXFLAGS)
-Iinclude
-std
=
c++11 single_include_test.cpp
-o
single_include_test
;
\
$(CXX)
$(CXXFLAGS)
-Iinclude
-std
=
c++11 single_include_test.cpp
-o
single_include_test
;
\
rm
single_include_test.cpp single_include_test
;
\
rm
-f
single_include_test.cpp single_include_test
;
\
done
done
##########################################################################
##########################################################################
...
...
include/nlohmann/detail/conversions/to_chars.hpp
View file @
5c04cc10
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#include <cmath> // signbit, isfinite
#include <cmath> // signbit, isfinite
#include <cstdint> // intN_t, uintN_t
#include <cstdint> // intN_t, uintN_t
#include <cstring> // memcpy, memmove
#include <cstring> // memcpy, memmove
#include <limits> // numeric_limits
#include <type_traits> // conditional
namespace
nlohmann
namespace
nlohmann
{
{
...
...
include/nlohmann/detail/input/input_adapters.hpp
View file @
5c04cc10
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <utility> // pair, declval
#include <utility> // pair, declval
#include <cstdio> //FILE *
#include <cstdio> //FILE *
#include <nlohmann/detail/iterators/iterator_traits.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace
nlohmann
namespace
nlohmann
...
...
include/nlohmann/detail/input/json_sax.hpp
View file @
5c04cc10
#pragma once
#pragma once
#include <cassert>
#include <cstddef>
#include <cstddef>
#include <string>
#include <string>
#include <vector>
#include <vector>
#include <nlohmann/detail/input/parser.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
namespace
nlohmann
namespace
nlohmann
{
{
...
...
include/nlohmann/detail/iterators/iter_impl.hpp
View file @
5c04cc10
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
#include <nlohmann/detail/iterators/primitive_iterator.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/macro_scope.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/cpp_future.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/value_t.hpp>
#include <nlohmann/detail/value_t.hpp>
namespace
nlohmann
namespace
nlohmann
...
...
include/nlohmann/detail/json_pointer.hpp
View file @
5c04cc10
#pragma once
#pragma once
#include <algorithm> // all_of
#include <cassert> // assert
#include <cassert> // assert
#include <numeric> // accumulate
#include <numeric> // accumulate
#include <string> // string
#include <string> // string
...
...
single_include/nlohmann/json.hpp
View file @
5c04cc10
...
@@ -2152,6 +2152,8 @@ constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
...
@@ -2152,6 +2152,8 @@ constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
#include <utility> // pair, declval
#include <utility> // pair, declval
#include <cstdio> //FILE *
#include <cstdio> //FILE *
// #include <nlohmann/detail/iterators/iterator_traits.hpp>
// #include <nlohmann/detail/macro_scope.hpp>
// #include <nlohmann/detail/macro_scope.hpp>
...
@@ -4236,14 +4238,15 @@ struct is_sax_static_asserts
...
@@ -4236,14 +4238,15 @@ struct is_sax_static_asserts
// #include <nlohmann/detail/input/json_sax.hpp>
// #include <nlohmann/detail/input/json_sax.hpp>
#include <cassert>
#include <cstddef>
#include <cstddef>
#include <string>
#include <string>
#include <vector>
#include <vector>
// #include <nlohmann/detail/input/parser.hpp>
// #include <nlohmann/detail/exceptions.hpp>
// #include <nlohmann/detail/exceptions.hpp>
// #include <nlohmann/detail/macro_scope.hpp>
namespace
nlohmann
namespace
nlohmann
{
{
...
@@ -5598,6 +5601,8 @@ template<typename BasicJsonType> struct internal_iterator
...
@@ -5598,6 +5601,8 @@ template<typename BasicJsonType> struct internal_iterator
// #include <nlohmann/detail/meta/cpp_future.hpp>
// #include <nlohmann/detail/meta/cpp_future.hpp>
// #include <nlohmann/detail/meta/type_traits.hpp>
// #include <nlohmann/detail/value_t.hpp>
// #include <nlohmann/detail/value_t.hpp>
...
@@ -9805,6 +9810,8 @@ class binary_writer
...
@@ -9805,6 +9810,8 @@ class binary_writer
#include <cmath> // signbit, isfinite
#include <cmath> // signbit, isfinite
#include <cstdint> // intN_t, uintN_t
#include <cstdint> // intN_t, uintN_t
#include <cstring> // memcpy, memmove
#include <cstring> // memcpy, memmove
#include <limits> // numeric_limits
#include <type_traits> // conditional
namespace
nlohmann
namespace
nlohmann
{
{
...
@@ -11778,6 +11785,7 @@ class json_ref
...
@@ -11778,6 +11785,7 @@ class json_ref
// #include <nlohmann/detail/json_pointer.hpp>
// #include <nlohmann/detail/json_pointer.hpp>
#include <algorithm> // all_of
#include <cassert> // assert
#include <cassert> // assert
#include <numeric> // accumulate
#include <numeric> // accumulate
#include <string> // string
#include <string> // string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment