summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/java/text/DateFormat.java
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-16 06:14:49 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-16 06:14:49 +0000
commit907743e7d7bb1375e88adb52d7656438fa135de4 (patch)
treec6b464617b7d00a515b81b19e8d79595d99f21d2 /libjava/classpath/java/text/DateFormat.java
parent12c2172df734a83580f4bf14409fb0aad7c2c8b7 (diff)
downloadppe42-gcc-907743e7d7bb1375e88adb52d7656438fa135de4.tar.gz
ppe42-gcc-907743e7d7bb1375e88adb52d7656438fa135de4.zip
PR c++/56782 - Regression with empty pack expansions
In the example of the patch below, during the instantiation of is_convertible at #1, we see at some point Tuple<>. (Let's note '{}' an empty argument pack.) In that context, during the partial specialization the member template template<class... U> Tuple<>::Tuple<U, typename enable_if<and_<is_convertible<U, {}>... >::value, int >::type > Let's look at what happens to the expansion "is_convertible<U, {}>...." To express the result of that expansion tsubst_pack_expansion receives the expansion is_convertible<U, T>, with the argument list [{}]. This function should detect that we have an empty argument pack for the parameter pack T and no argument pack for the parameter pack U. It should thus return a pack expansion "is_convertible<U,T>..." that has this information: "I have gotten an argument list, that is not complete because U doesn't have any argument pack; the argument pack for T is '{}', so I'll wait for the next time I am passed to tsubst_pack_expansion with enough additional argument packs, to really perform the substitution". That information is conveyed by attaching the the '{}' to the PACK_EXPANSION_EXTRA property of the pack expansion returned by tsubst_pack_expansion. The problem in this report is that we are not setting PACK_EXPANSION_EXTRA when the non-complete argument pack list is made of an empty argument pack, because use_pack_expansion_extra_args_p doesn't detect this case. Fixed thus. gcc/cp/ * pt.c (use_pack_expansion_extra_args_p): When at least a parameter pack has an empty argument pack, and another parameter pack has no argument pack at all, use the PACK_EXPANSION_EXTRA mechanism. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/text/DateFormat.java')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud