[Bug c++/114275] New: using std::thread within a templated function in a module fails to compile
michael.kenzel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 8 02:04:29 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114275
Bug ID: 114275
Summary: using std::thread within a templated function in a
module fails to compile
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: michael.kenzel at gmail dot com
Target Milestone: ---
The following example will reproduce the issue:
// A.ixx
module;
#include <thread>
export module A;
export void fun(auto&&)
{
std::thread([]{}).join();
}
// main.cpp
import A;
int main()
{
fun(42);
}
build with
g++ -std=c++23 -fmodules-ts -c -x c++ A.ixx
g++ -std=c++23 -fmodules-ts main.cpp A.o
results in
‘
/usr/include/c++/13/tuple:491: confused by earlier errors, bailing out
More information about the Gcc-bugs
mailing list