vartembug.cxx:25: error: wrong number of template arguments (3, should be 4 or more) vartembug.cxx:8: error: provided for âtemplate<bool found_label, bool found_size, bool found_sign, bool found_endian, class ... Args> struct bitstring_entry_attributesâ
>From the following code: template < bool found_label, bool found_size, bool found_sign, bool found_endian, typename... Args > struct bitstring_entry_attributes { }; template < bool found_size, bool found_sign, bool found_endian, typename Arg, typename... Args > struct bitstring_entry_attributes< false, found_size, found_sign found_endian, Arg, Args... > { }; $ g++-4.3.3 -v -save-temps -std=gnu++0x vartembug.cxx Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.3.3-r2/work/gcc-4.3.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --disable-libgcj --enable-languages=c,c++,treelang --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.3-r2 p1.1, pie-10.1.5' Thread model: posix gcc version 4.3.3 (Gentoo 4.3.3-r2 p1.1, pie-10.1.5) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu++0x' '-shared-libgcc' '-mtune=generic' /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.3/cc1plus -E -quiet -v -D_GNU_SOURCE vartembug.cxx -D_FORTIFY_SOURCE=2 -mtune=generic -std=gnu++0x -fpch-preprocess -o vartembug.ii ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include/g++-v4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include/g++-v4/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include/g++-v4/backward /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu++0x' '-shared-libgcc' '-mtune=generic' /usr/libexec/gcc/x86_64-pc-linux-gnu/4.3.3/cc1plus -fpreprocessed vartembug.ii -quiet -dumpbase vartembug.cxx -mtune=generic -auxbase vartembug -std=gnu++0x -version -o vartembug.s GNU C++ (Gentoo 4.3.3-r2 p1.1, pie-10.1.5) version 4.3.3 (x86_64-pc-linux-gnu) compiled by GNU C version 4.3.3, GMP version 4.2.4, MPFR version 2.4.1-p1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 99eb7989473b1a2e92eed91867d56b9a Of interest is that removing 2 of the non-variadic arguments/parameters (giving the following) compiles fine: template < bool found_label, bool found_endian, typename... Args > struct bitstring_entry_attributes { }; template < bool found_endian, typename Arg, typename... Args > struct bitstring_entry_attributes< false, found_endian, Arg, Args... > { }; -- Summary: "wrong number of template arguments" in variadic template specialization Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: me22 dot ca at gmail dot com GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39658