- Notifications
You must be signed in to change notification settings - Fork14.5k
Closed
Description
For this code:
// module.mapmodule"foo" {export * header"foo.h"}module"bar" {export * header"bar.h"}// foo.htemplate<classT>conceptA =true;// bar.htemplate<classT>conceptA =false;// foo.cpp// clang -std=c++20 -fmodules -fimplicit-modules -fmodule-map-file=module.map foo.cpp#include"foo.h"#include"bar.h"template<classT>voidfoo() requires A<T> {}voidmain() { foo<int>(); }
Expected: compiling the code produces an error asconcept A
is defined differently in two consumed modules, therefore it produces an ODR violation.
Actual: no error about ODR violation. Depending on the chosen concept a call tofoo<int>()
either succeeds or fails.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status