-
-
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
Support "import" statement in module interface files. #3424
Comments
What is line 18037 in your version? I downloaded the
|
That constructor is on line 18050 for me. The constructor right above it makes use of I think the error may be coming from the forward declaration of
|
Not sure how you can have too few arguments for a template that has all its arguments defaulted. |
Also had the same issue, both with header units and modules (VS 2022). |
Same here, on Visual Studio 2022 preview. |
FYI, PR #3518 is failing CI because of the same error message in a different context (and on older MSVC compilers). I haven't looked into it any further because I'm not actively seeking to have that PR merged at this time, but it might be worth reconsidering if it can incidentally fix this issue. |
Description
I'm using
MSVC 2022
with/std:c++20
.I'm trying to import
single_include
version3.10.5
into my module interface file (*.ixx
).However, I am receiving an error.
json.hpp(18037,17): error C2976: 'nlohmann::adl_serializer': too few template arguments
Including the file in the global module fragment does work:
However, exporting only
nlohmann::json
with ausing
statement produces errors about dependent types, so I would like to export the whole import.Reproduction steps
Try to import json.hpp into a module interface file.
Expected vs. actual results
Does not compile.
Minimal code example
No response
Error messages
`json.hpp(18037,17): error C2976: 'nlohmann::adl_serializer': too few template arguments`
Compiler and operating system
MSVC 2022
Library version
3.10.5
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: