-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Standard Library Header Units and Modules - tracking issue #1694
Comments
This was referenced Feb 24, 2021
StephanTLavavej
changed the title
Tracking issue for P1502R1 Standard Library Header Units
Standard Library Header Units and Modules - tracking issue
Jul 18, 2022
Great to see the note that std lib modules are ready for production use (as of VS2022 17.5, MSVC only). Does that mean that the statement shown here in the documentation about not using preview releases in production code, should be removed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📄 Documentation
std
andstd.compat
std
Andstd.compat
#2930🚧 Status
We've reported the following compiler bugs; this issue is for tracking the status of these compiler bugs and removing workarounds/adding test coverage as compiler fixes are released.
As
/clr
C++20 support is a work in progress, we are not yet testing Standard Library Header Units under/clr
.❌ Clang
🐛 EDG (IntelliSense Front-End)
🪲 Active, UCRT
static inline
functions cannot be called when using modules"<ctime>
:time()
/localtime()
/mktime()
emit error C2129: static function declared but not defined StephanTLavavej/STL#21🐞 Active, C1XX (MSVC Front-End)
<filesystem>
: compiler error usingdirectory_iterator
/recursive_directory_iterator
inside a struct/class with modules #3661std
module to export too much stuff.pair(piecewise_construct_t, tuple, tuple)
"'std::_Unsigned128'
: no appropriate default constructor available"uniform_real_distribution
emits error C2512:'std::_Unsigned128'
: no appropriate default constructor available #4899generate_canonical
causes C1XX ICE:find_pending_comparison_function_for_definition(function) == std::end(pending_comparison_functions_for_definition)
"std::cout
properly"❔ Possible Improvements (C1XX/MSBuild)
import std.compat;
,std::printf
, orstd::cout
"import std;
is seen, butstd.ifc
/std.obj
need to be built"import std;
andimport std.compat;
"🛠️ Upcoming Improvements (C1XX)
std::formatter
in module is not found in other module."'promise_type'
: is not a member of'std::coroutine_traits<TestModule::FireAndForget>'
#4826std::stacktrace
"std::format
in a module requires including<format>
header in .cpp files using that module"🩹 Permanent Workarounds
std::projected::operator*()
error LNK2019: unresolved external symbol"abort()
.😻 Fixed, Workaround Removed
'std::pointer_traits<_Voidptr>'
: more than one partial specialization matches the template argument list"__pragma(warning(disable : 4996))
doesn't take effect"'std::char_traits'
"std::_Yarn<char>::operator=(char const *)
already defined"std::optional
,c1xx!FindConversionFunctions()
assertion failed:PF_ISSET(ParsingClassTemplateDefn)
"std::variant
,c1xx!Module::InterfaceReader::materialize_function()
assertion failed"'std::ranges::operator =='
: a trailingrequires
clause is only allowed on a templated function"/headerUnit:angle
ICEs"queue
'sfriend bool operator==
"/headerUnit:angle vector=vector.ifc
header-units.json
via/sourceDependencies:directives
and/translateInclude
/exportHeader /headerName:angle algorithm type_traits vector
_Nontrivial_dummy_type
's constructor"type_info
's equality operator"<format>
as a header unit"_CrtGetAllocHook
emits warning C5106: macro redefined with different parameter names"convertible_to
constrains a constructor"<ranges>
compiler assertion:previous_element == tokenInputStack.TopOfStack()
, aliastemplates.cpp 1010"template <int = 0>
tovformat()
emits warnings C4265 and C4365"#pragma warning
doesn't always suppress warnings in templates"/scanDependencies
generates incorrect"logical-name"
in JSON output"fatal error C1116: unrecoverable error importing module
, with<concepts>
"fatal error C1116: unrecoverable error importing module ''
"error C2672: 'count_if': no matching overloaded function found
"chrono::days
emits bogus error C2131"<chrono>
emits fatal error C1116: unrecoverable error importing header unit'<chrono>'
"std.ixx
emits fatal error C1011: cannot locate standard module interface"extern "C"
function declarations takingextern "C"
types emit bogus error LNK2019: unresolved external symbol"extern "C"
function mentioning entity with module linkage is being marked with module linkage"Module::InterfaceReader::materialize_function<Module::helpers::MemberBuilder>()
"construct_at
SFINAE causes Modules bogus error C2660: 'operator new': function does not take 3 arguments"<codecvt>
: fatal error C1001: Internal compiler error.<any>
: error C2679: binary'!='
: no operator found which takes a right-hand operand of type'const type_info'
(or there is no acceptable conversion)<memory>
: error C2679: binary'=='
: no operator found which takes a right-hand operand of type'const type_info'
(or there is no acceptable conversion)<functional>
: error C2027: use of undefined type'type_info'
<typeinfo>
: error C2872:'type_info'
: ambiguous symbol<typeindex>
: error C2440: 'initializing': cannot convert from 'initializer list' to'std::type_index'
<regex>
: Assertion failed:Nerrors > 0
, fileD:\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\trees.c
/d1ifcInlineFunctions
asserts(bits::rep(typeEncoding.basicEncoding_) & 0x0000000F) != 0
forprintf(_Format, ...)
"<expected>
ICEs withAssertion failed: IsInClassDefn()
"'_Iterator_base12'
: the symbol to the left of a'::'
must be a type"operator&
"<ranges>
: could not use std::views::istream StephanTLavavej/STL#13 VSO-1581022 "Standard Library Modules:inline constexpr
variables forranges::views
emiterror LNK2019: unresolved external symbol
"'memcpy_s'
because it has internal linkage"extern "C++"
is directly applied to a class with a static member function"<ranges>
: ICE with std::views::join_with StephanTLavavej/STL#17 VSO-1582910 "Standard Library Modules: ICE withstd::views::join_with
"<variant>
: Constructor inheritance causes ICE when class in named module inherits from class imported frommodule std
StephanTLavavej/STL#18 VSO-1582916 "Standard Library Modules: ICE when class in named module inherits fromvariant
with inheriting constructors"chunk_view
of input iterators"inserted
, file template.cpp, line 10275"IsInClassDefn() && (region->owner == SU_TAG)
, file reader.cpp, line 2592"<fstream>
: Importing as a header unit leads to error C2079: undefined class'std::basic_ofstream<char,std::char_traits<char>>'
"destroy_at()
emits bogus error C2131: expression did not evaluate to a constant"iota_view
emits bogus error C7608: atomic constraint should be a constant expression"constexpr vector::resize()
ICE"<ranges>
: Usage ofranges::iterator_t
causes ICE StephanTLavavej/STL#23 VSO-1584629 "Standard Library Modules: Usage ofranges::iterator_t
causes ICE"<atomic>
: Building a header unit with/ZI
emits warning C5260 #3287 VSO-1706387 "<atomic>
: Building a header unit with/ZI
emits warning C5260"source_location::column()
misbehaves in user headers"'std::filesystem::_Dir_enum_impl'
: base class undefined #3333 VSO-1715231 "Standard Library Modules: Bogus error C2504:'std::filesystem::_Dir_enum_impl'
: base class undefined"charconv
gives wrong result"using namespace std::chrono;
for UDLs emits bogus error C3688: invalid literal suffix"/analyze
ICE"osyncstream
move assignment emits bogus error C3083:'basic_ostream<char,std::char_traits<char> >'
: the symbol to the left of a'::'
must be a type"sort()
emits bogus error C2065:'_Atomic_counter_t'
: undeclared identifier"<format> + <chrono>
: Could not format durations StephanTLavavej/STL#14 VSO-1582358 "Standard Library Modules:chrono
formatting emits bogus error C3861:'_Fill_tm'
: identifier not found"<chrono>
: Spurious warning C4702: unreachable code StephanTLavavej/STL#15 VSO-1582381 "Standard Library Modules: Bogus warning C4702: unreachable code"'#include <meow>'
in the purview of module'std'
appears erroneous"tuple
changes"<format>
causes C4296 warning that need to be suppressed every time" (with header units)static constexpr
data members"std::expected
error C2280 attempting to reference a deleted function"std::views::iota
in member function in module causes ICE"std::views::repeat
in member functions gives bogus error about lack ofcompare
header"'...'
: there are no parameter packs available to expand module"numeric_limits
"ctype<char>::table_size
should be a compile-time constant"std::mdspan
is unusable with C++20 modules"std::basic_string_view
symbols""<chrono>
year_month_weekday
andyear_month_weekday_last
emit bogus error C2131: expression did not evaluate to a constant"day{31}
initializers emits 'not yet implemented' internal compiler error"extern "C++"
doesn't avoid all problems when mixing includes and imports"extern "C++"
interferes with ADL"std::filesystem::path::generic_string()
in a module unit"'std'
when constructing and exporting astd::chrono::zoned_time
object"chrono::time_point
formatting emits bogus error C3861:'_Fill_tm'
: identifier not found"utc_clock::now()
emits fatal error C1116: unrecoverable error importing module'std'
."'std'
. Specialization of'std::invoke_result_t'
with arguments'_Fn, _Ty...'
"std::views::zip
withstd::views::iota
in C++20 module results in C1001 Internal compiler error"🏗️ Building Deduplicated Header Units
Here's the part of our Python-powered test harness that builds "deduplicated" header units by topologically sorting them:
STL/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py
Lines 56 to 109 in ef62d3f
With a bit of work, this can be extracted into a standalone Python script. (With significantly more work, it could be converted into CMake.)
The text was updated successfully, but these errors were encountered: