[llvm-bugs] [Bug 47931] New: initializer list {} fails for template instantiation + map + tuple +vector

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 21 04:58:52 PDT 2020


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: unassignedclangbugs at nondot.org
          Reporter: juanlucasrey at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201021/ff7ca7e6/attachment.html>


More information about the llvm-bugs mailing list