[llvm-bugs] [Bug 25271] New: Parameter default values of forward-declared template classes with template parameter packs don't PCH roundtrip
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 21 06:28:47 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25271
Bug ID: 25271
Summary: Parameter default values of forward-declared template
classes with template parameter packs don't PCH
roundtrip
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jix at jixco.de
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15131
--> https://llvm.org/bugs/attachment.cgi?id=15131&action=edit
tar of cpp file, header file and shell script to reproduce the bug
When having a forward declaration like this
template<unsigned T=123, unsigned... U> class dummy;
in a header file that also contains the class definition, using dummy<> fails
with
error: too few template arguments for class template 'dummy'
when using a precompiled header, even though it works fine otherwise (as it
should).
The bug applies to integer template parameters (as in the given example) as
well as to typename parameters.
The bug doesn't apply to class templates without forward declaration.
The bug also doesn't apply to class templates without a following parameter
pack.
A real world example that triggers this is using gsl::array_view<int> from:
https://github.com/Microsoft/GSL/blob/master/include/array_view.h
I tested with 3.7.0 and svn trunk, which both are affected.
--
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/20151021/d7979afe/attachment.html>
More information about the llvm-bugs
mailing list