-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make json.hpp aware of the modules TS? #891
Comments
I have just proposed an |
I have no idea how we could or should adjust our code to support Modules TS. Could you please post the errors you observe? |
sure, when using it the intelisence in VS2017 seems to think there is an issue with #include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform
#include <array> // array
#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 <cstdint> // int64_t, uint64_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 <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 <map> // map
#include <memory> // addressof, allocator, allocator_traits, unique_ptr
#include <numeric> // accumulate
#include <sstream> // stringstream
#include <string> // getline, stoi, string, to_string
#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> // declval, forward, make_pair, move, pair, swap
#include <valarray> // valarray
#include <vector> // vector would then be: import std.core;
import std.memory; only when it is defined. Although probably an better option is an macro someone can define where those are not explicitly included when defined where the user can include them themselves. |
But how can a TS which is not yet part of C++ be an issue for a C++11 library? |
When the library is also used in newer versions of C++ as well, but the rest might be true and might have to be considered by the compiler people as well. |
If Modules TS is part of the language, then not only my library, but all libraries would have issues, and I think this is either a bug or there will be macros to detect this. Until then, there is nothing we can do. |
Bug Report
What is the issue you have?
Using json.hpp with the Modules TS.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
import std.core;
before#include <json.hpp>
What is the expected behavior?
For
json.hpp
toifdef
some macro for if the user has the modules TS to import the standard library dependencies instead of#include
ing them. However I am not sure such macro exists.And what is the actual behavior instead?
No check whatsoever and include of the standard library headers separately.
Which compiler and operating system are you using? Is it a supported compiler?
MSVC++ 2017 15.5.2, Windows 7 Ultimate build 7601 SP1 x64
Did you use a released version of the library or the version from the
develop
branch?Develop branch
If you experience a compilation error: can you compile and run the unit tests?
Unsure on compile errors.
Also this might be unrelivant to the issue, It would also be nice if the json.hpp could be imported as well just like
std.core
byimport json;
The text was updated successfully, but these errors were encountered: