public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52292] New: [C++11] Variadic template expansion into fixed template causes constructor to not match
@ 2012-02-17  1:01 leckey.ryan at gmail dot com
  2012-02-17  3:56 ` [Bug c++/52292] " leckey.ryan at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: leckey.ryan at gmail dot com @ 2012-02-17  1:01 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52292
           Summary: [C++11] Variadic template expansion into fixed
                    template causes constructor to not match
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: leckey.ryan@gmail.com


The following should compile but fails with several errors about declaration
errors.

template <template <typename...> class T>
struct foo {
    template <typename... U>
    foo(T<U...> x) { }
};

template <typename T>
struct bar {
    bar(T x) : value(x) { }

    T value;
};

struct generic : private foo<bar> {
    template <typename T>
    generic(bar<T> x) : foo(x)
    {
    }

};

int main()
{
    bar<int> x(32);
    generic y(x); // FAILS
}

If you remove the '...' then everything works.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-16  3:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17  1:01 [Bug c++/52292] New: [C++11] Variadic template expansion into fixed template causes constructor to not match leckey.ryan at gmail dot com
2012-02-17  3:56 ` [Bug c++/52292] " leckey.ryan at gmail dot com
2012-04-16  0:23 ` jason at gcc dot gnu.org
2012-04-16  3:18 ` jason at gcc dot gnu.org
2012-04-16  3:41 ` jason at gcc dot gnu.org
2012-04-16  3:53 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).