https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114990

--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jason Merrill from comment #6)
> (In reply to cqwrteur from comment #5)
> > 
> > Is this a C++ standard defect? There is no inline definition for classes and
> > templates that allow multiple definitions to be discarded in different
> > modules, just like "inline" does in the other translation units.
> 
> In the testcase all definitions are attached to the global module because
> they precede any "export module" line, so the usual merging applies.

My question is that

//someheader.hpp
inline void foo() noexcept
{
     //dosomethingheader
}


//bar.cppm
module;
#include<someheader.hpp>
export module bar;
export inline void foo() noexcept;

//main.cpp
Import bar;
#include<someheader.hpp>
Int main()
{
     foo(); //which foo()? The foo in the header or the foo in the module?
}

Reply via email to