Find a file
Dodji Seketeli f5b6d0d1d2 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.

From-SVN: r198956
2013-05-16 08:14:49 +02:00
boehm-gc Add ChangeLog entry for r197770 (in boehm-gc). 2013-05-02 21:48:45 +02:00
config
contrib compare_tests: Limit lines to 2000 characters as comm on Mac OS X 10.8.3 doesn't like long... 2013-05-13 17:52:42 +00:00
fixincludes inclhack.def (aix_null): New. 2013-05-04 10:49:59 -04:00
gcc PR c++/56782 - Regression with empty pack expansions 2013-05-16 08:14:49 +02:00
gnattools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcpp N3472 binary constants 2013-04-28 23:36:57 +02:00
libdecnumber
libffi
libgcc cygming-crtbegin.c (__register_frame_info): Make weak. 2013-05-08 20:33:52 +02:00
libgfortran libcaf.h (_gfortran_caf_critical): Add a prototype. 2013-05-05 19:47:22 -04:00
libgo
libgomp
libiberty hashtab.c (hash_pointer): Remove conditional and avoid unexecuted shift equal to wordsize. 2013-05-06 11:40:54 -04:00
libitm Move libitm ChangeLog entry to the right ChangeLog file. 2013-05-02 13:32:11 +02:00
libjava Enable java for aarch64 2013-04-16 08:49:51 +00:00
libmudflap
libobjc
libquadmath
libsanitizer arm.c (arm_asan_shadow_offset): New function. 2013-05-07 16:17:50 +02:00
libssp
libstdc++-v3 printers.py (Tr1HashtableIterator): Fix rendering of std::tr1 unordered containers iterator. 2013-05-15 19:39:18 +00:00
lto-plugin
maintainer-scripts
zlib
.gitignore
ABOUT-NLS
ChangeLog MAINTAINERS: Update my email; move myself from Fortran reviewer to Write After Approval. 2013-04-30 11:31:46 -07:00
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Enable java for aarch64 2013-04-16 08:49:51 +00:00
configure.ac Enable java for aarch64 2013-04-16 08:49:51 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Update my email; move myself from Fortran reviewer to Write After Approval. 2013-04-30 11:31:46 -07:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.