https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103499
--- Comment #2 from Mark Millard <markmigm at gmail dot com> --- (In reply to Mark Millard from comment #1) > // g++12 -std=c++20 -fmodules-ts -xc++ -c gpp12_module_iostream_failure.cppm > // g++12 -freport-bug -std=c++20 -fmodules-ts -c > gpp12_module_iostream_failure.cpp The iostream based file names were from before I reduced the test to the smaller test case. The updated comments are: // g++12 -std=c++20 -fmodules-ts -xc++ -c gpp12_module_is_nothrow_constructible_v_failure.cppm // g++12 -std=c++20 -fmodules-ts -xc++ -c gpp12_module_is_nothrow_constructible_v_failure.cpp On Fedora 26, where "c++" is g++ 12.2.1, I've tried the same, with the copies of the source code, and it gets the same error. The -freport-bug outout is shown below. # more /tmp/ccRnanx8.out // Target: aarch64-redhat-linux // Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzil la.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-ob ject --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.2. 1-20220819/obj-aarch64-redhat-linux/isl-install --enable-gnu-indirect-function --build=aarch64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 // Thread model: posix // Supported LTO compression algorithms: zlib zstd // gcc version 12.2.1 20220819 (Red Hat 12.2.1-1) (GCC) // // In module /usr/include/c++/12/type_traits, imported at gpp12_module_is_nothrow_constructible_v_failure.cpp:7: // /usr/include/c++/12/type_traits: In substitution of ‘template<class _Tp, class ... _Args> using __is_nothrow_constructible_impl = std::__bool_constant<__is_nothrow_constructible(_Tp)> [with _Tp = d erived@derived_interface; _Args = {}]’: // /usr/include/c++/12/type_traits:1047:12: required from ‘struct std::is_nothrow_constructible<derived@derived_interface>’ // /usr/include/c++/12/type_traits:3243:46: required from ‘constexpr const bool std::is_nothrow_constructible_v<derived@derived_interface>’ // gpp12_module_is_nothrow_constructible_v_failure.cpp:11:11: required from here // /usr/include/c++/12/type_traits:1041:11: error: invalid use of non-static member function ‘virtual constexpr derived@derived_interface::~derived()’ // 1041 | using __is_nothrow_constructible_impl // | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // In module derived_interface, imported at gpp12_module_is_nothrow_constructible_v_failure.cpp:5: // gpp12_module_is_nothrow_constructible_v_failure.cppm:10:15: note: declared here // 10 | export struct derived : base // | ^~~~~~~ // /usr/include/c++/12/type_traits:1041: confused by earlier errors, bailing out // /usr/libexec/gcc/aarch64-redhat-linux/12/cc1plus -quiet -D_GNU_SOURCE gpp12_module_is_nothrow_constructible_v_failure.cpp -quiet -dumpbase gpp12_module_is_nothrow_constructible_v_failure.cpp -dumpb ase-ext .cpp -mlittle-endian -mabi=lp64 -std=c++20 -freport-bug -fmodules-ts -o - -frandom-seed=0 -fdump-noaddr # 0 "gpp12_module_is_nothrow_constructible_v_failure.cpp" # 0 "<built-in>" # 0 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 0 "<command-line>" 2 # 1 "gpp12_module_is_nothrow_constructible_v_failure.cpp" import derived_interface; import "/usr/include/c++/12/type_traits"; void test() { if (std::is_nothrow_constructible_v<derived>); }