https://bugs.llvm.org/show_bug.cgi?id=45173

            Bug ID: 45173
           Summary: cannot access any object in global module fragment
                    from exported template function
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Created attachment 23220
  --> https://bugs.llvm.org/attachment.cgi?id=23220&action=edit
source files - build with build.bat or build.sh

// accessing foo ( which is defined in global-module-fragment )
// in an exported-non-template-function succeeded
// but failed in an exported-template-function.

// see attached files and build with build.bat or build.sh


// my_module.cppm

module;

#include "foo.h"   // inline void foo() {}

export module my_module;

export namespace my_module
{
        void bar()
        {
                ::foo();             // OK
        }

        template< class Type >
        void baz()
        {
                ::foo();             // ERROR
        }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to