https://bugs.llvm.org/show_bug.cgi?id=43087
Bug ID: 43087
Summary: Over-eager template instantiation breaks libstdc++
variant from gcc 10 trunk
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: unassignedclangb...@nondot.org
Reporter: david.tr...@arm.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
Created attachment 22414
--> https://bugs.llvm.org/attachment.cgi?id=22414&action=edit
Simple reproducing case
libstdc++ 10 has changes to its variant implementation that cause compilation
to fail with clang. I've attached a file that works with clang and libc++ and
also with gcc and libstdc++. It seems that clang is over-eager when
instantiating the templates and goes looking for a constructor further down the
nested stack when there's a valid one higher up.
The same problem did manifest with libc++, but was fixed by this commit:
https://github.com/llvm-mirror/libcxx/commit/301501fb78f90d65cec68f22144f3446a571e553#diff-9308c8fc46861ae969c076f9b7637013
However, since clang has had the same problem with both libc++ and libstdc++,
and gcc doesn't have the same problem with libstdc++, I suspect this represents
a bug at the clang end.
--
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