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

            Bug ID: 47931
           Summary: initializer list {} fails for template instantiation +
                    map + tuple +vector
           Product: clang
           Version: 11.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: juanlucas...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Created attachment 24085
  --> https://bugs.llvm.org/attachment.cgi?id=24085&action=edit
fail exemple

this is a pretty specific bug, probably due to the explicit instantiation:

when having an initialisation list for a std::map<something1,
std::tuple<something2, std::vector<something3>>> inside an explicitly
instantiated function, there is a failure of type:

Undefined symbols for architecture x86_64: std::__1::allocator<unsigned long> >
>::~tuple()"

there is no reason why the attached code should fail to compile, and it
actually works on gcc.

note:
-remove the explicit instantiation and it works
-replace the vector by a simple type like int and it works
-remove the map and it works

I used "clang++ -std=c++17 ./clangbug.cpp"

sorry I'm new here let me know if anything else is needed

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

Reply via email to