Repository navigation
Spurious constexpr constructor diagnostic for dllimport class with virtual function #583
jakub-labenski
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
In Microsoft mode, the front end rejects an explicitly constexpr, defaulted constructor in a dllimport class with a virtual destructor. It says the corresponding implicit constructor would not be constexpr. The declaration should be accepted.
Reproducing Source Code
Command-line Options
cpfe --microsoft test.cpp
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
A related case occurs in GNU and Clang emulation modes: an implicit default constructor of a dllimport class with a virtual function is marked
non-constexpr, soconstexpr Y y{}; is rejected. That case reproduces with--c++17 --g++ --ms_extensionsand--c++17 --clang --ms_extensions.Reproducing (Standard) Configuration(s)
linux-gcc-debug
Reproducing (Non-standard) Configuration
No response
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