This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH: PR 20599 (variadic templates, take two) (2/4)


This patch addresses PR c++/20599 by introducing support for variadic
templates:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20599

This is a revised version of the patch posted previously. It addresses several bugs in the original patch and includes changes to libstdc++ that use variadic templates for the implementation of Library TR1 tuples and function objects. In particular, the changes from the first patch are:
- Warn about variadic templates by default; -Wno-variadic-templates turns off this warning.
- Support printing parameter packs in function types (for error messages)
- Support for nested expansion of parameter packs.
- Tighter error checking.


More information about variadic templates is available here:

http://www.generic-programming.org/~dgregor/cpp/variadic- templates.html

This is part 2 of 4. It contains all of the command-line option handling and documentation.

Tested on mainline with powerpc-apply-darwin8.7.0 and i686-pc-linux- gnu; no new regressions. All new tests pass.

	Doug Gregor
	Open Systems Lab @ Indiana University

2006-09-19 Douglas Gregor <doug.gregor@gmail.com>

	PR c++/20599
	* c-common.c (warn_variadic_templates): New.
	* c-common.h (warn_variadic_templates): Declare.
	* c-cppbuiltin.c (c_cpp_builtins): Define __VARIADIC_TEMPLATES
	when we aren't complaining about them.
	* c-opts.c (c_common_handle_option): Handle
	-W(no-)variadic-templates.
	(c_common_post_options): By default, do warn about variadic
	templates.
	* c.opt: Add -W(no-)variadic templates.
	* doc/cpp.texi: Document __VARIADIC_TEMPLATES macro.
	* doc/invoke.texi: Document -W(no-)variadic-templates.

Attachment: vt-gcc-trunk-v2.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]