Skip to content

Commit 307c053

Browse files
Add missing <numeric> include (nlohmann#3719)
1 parent bed648c commit 307c053

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

include/nlohmann/detail/exceptions.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#include <cstddef> // nullptr_t
1212
#include <exception> // exception
13+
#if JSON_DIAGNOSTICS
14+
#include <numeric> // accumulate
15+
#endif
1316
#include <stdexcept> // runtime_error
1417
#include <string> // to_string
1518
#include <vector> // vector

include/nlohmann/json.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#endif // JSON_NO_IO
2828
#include <iterator> // random_access_iterator_tag
2929
#include <memory> // unique_ptr
30-
#include <numeric> // accumulate
3130
#include <string> // string, stoi, to_string
3231
#include <utility> // declval, forward, move, pair, swap
3332
#include <vector> // vector

single_include/nlohmann/json.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#endif // JSON_NO_IO
2828
#include <iterator> // random_access_iterator_tag
2929
#include <memory> // unique_ptr
30-
#include <numeric> // accumulate
3130
#include <string> // string, stoi, to_string
3231
#include <utility> // declval, forward, move, pair, swap
3332
#include <vector> // vector
@@ -183,6 +182,9 @@
183182

184183
#include <cstddef> // nullptr_t
185184
#include <exception> // exception
185+
#if JSON_DIAGNOSTICS
186+
#include <numeric> // accumulate
187+
#endif
186188
#include <stdexcept> // runtime_error
187189
#include <string> // to_string
188190
#include <vector> // vector

0 commit comments

Comments
 (0)