------- Comment #3 from sebor at roguewave dot com 2009-04-04 23:12 ------- This limitation makes implementing the latest std::tuple difficult. Quoting from a post to c++std-...@accu.org:
Martin Sebor wrote: > To: C++ libraries mailing list > Message c++std-lib-23549 > > After reducing the error to a smaller test case and some digging > through gcc Bugzilla it looks as though it is well-formed but gcc > doesn't implement it yet: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722 > > The errors are different but the problem seems the same in both > cases. > > Martin Sebor wrote: >> To: C++ libraries mailing list >> Message c++std-lib-23548 >> >> I'm probably missing something but can someone confirm that the >> declaration of the tuple ctor below (taken from N2857) is well >> formed given that pair is not a variadic template? >> >> The latest gcc complains: >> >> error: wrong number of template arguments (1, should be 2) >> >> Thanks! >> >> template <VariableType... Types> >> class tuple >> { >> public: >> ... >> template <Allocator Alloc, class... UTypes> >> requires ConstructibleWithAllocator<Types, Alloc, const UTypes&>... >> tuple(allocator_arg_t, const Alloc& a, const pair<UTypes...>&); >> ... >> }; >> >> >> Here's a small test case: >> >> $ cat t.C && g++ -std=c++0x t.C >> template <class T, class U> struct pair { }; >> struct allocator_arg_t { }; >> template <class ...T> >> struct tuple { >> template <class U, class ...V> >> tuple (allocator_arg_t, const U&, const pair<V...>&); >> }; >> t.C:6: error: wrong number of template arguments (1, should be 2) >> t.C:1: error: provided for ‘template<class T, class U> struct pair’ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722