Repository navigation
EDG's __is_aggregate builtin should be updated to match LWG-3823's preconditions
#285
StephanTLavavej
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
I'm the primary maintainer of microsoft/STL, and we've encountered an issue in EDG, which we're working around in the STL. Using VS Insiders / MSVC Build Tools Preview, the following code is correctly accepted by the MSVC Compiler 19.52.36815 and Clang 22.1.3, but rejected by EDG 6.9. This is using MSVC's undocumented
/BEoption to invoke VS's copy of the EDG frontend used for IntelliSense.When we reported this to EDG before it was open-sourced, we were told this was being tracked as EDGcpfe/25827. (For my own reference, this was also MSVC-internal VSO-1690654.)
The issue is that after LWG-3823 "Unnecessary precondition for
is_aggregate" was accepted, N5054 [tab:meta.unary.prop] says:This allows arrays of incomplete types (and arrays are always aggregates).
We're working around this in MSVC's STL by activating EDG-specific product code to detect arrays as a special case. We would prefer to use the same code for all compilers, directly using the
__is_aggregatebuiltin. (This follows our long-standing philosophy in the<type_traits>header of Don't Help The Compiler, i.e. the compiler should be responsible for answering type traits queries without extra layers of Library code. This results in the highest throughput and least potential for bugs.)Reproducing Source Code
Command-line Options
cl /EHsc /nologo /W4 /std:c++latest /c /BE /dE--version meow.cpp
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
Compiler output showing how MSVC and Clang accept while EDG rejects:
Reproducing (Standard) Configuration(s)
windows-msvc-release
Reproducing (Non-standard) Configuration
dump_configuration.txt
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions