public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50140] New: sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list
@ 2011-08-20 20:52 lcid-fire at gmx dot net
  2011-08-20 23:16 ` [Bug c++/50140] [C++0x] " paolo.carlini at oracle dot com
  2011-10-14 19:16 ` jason at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: lcid-fire at gmx dot net @ 2011-08-20 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50140
           Summary: sorry, unimplemented: cannot expand ‘T ...’ into a
                    fixed-length argument list
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lcid-fire@gmx.net


Trying to use metaprogramming with variadic templates g++ chokes on the
following code:

template<GLenum One, GLenum... Others>
class Eval
{
public:
    bool eval(GLenum value)
    {
        if( value == One )
            return true;

        Eval<Others...> recurse();
        // Try out the rest
        return recurse.eval(value);
    };
};

template<>
class Eval
{
public:
    bool eval(GLenum value)
    {
        return false;
    };
};

template<GLenum... ValidEnums>
class GLPart
{
protected:
    GLPart()
    {
    };
public:
    bool Evaluate(GLenum value)
    {
        Eval<ValidEnums...> ev();
        bool isValid = ev.eval(value);

        if( !isValid )
            glSetError(GL_INVALID_ENUM);

        return isValid;
    };
};

which gives the error:
sorry, unimplemented: cannot expand ‘Others ...’ into a fixed-length argument
list


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

* [Bug c++/50140] [C++0x] sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list
  2011-08-20 20:52 [Bug c++/50140] New: sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list lcid-fire at gmx dot net
@ 2011-08-20 23:16 ` paolo.carlini at oracle dot com
  2011-10-14 19:16 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-08-20 23:16 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu.org
            Summary|sorry, unimplemented:       |[C++0x] sorry,
                   |cannot expand ‘T ...’ into  |unimplemented: cannot
                   |a fixed-length argument     |expand ‘T ...’ into a
                   |list                        |fixed-length argument list

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-08-20 23:13:04 UTC ---
Seems related to PR35722. Dodji?


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

* [Bug c++/50140] [C++0x] sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list
  2011-08-20 20:52 [Bug c++/50140] New: sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list lcid-fire at gmx dot net
  2011-08-20 23:16 ` [Bug c++/50140] [C++0x] " paolo.carlini at oracle dot com
@ 2011-10-14 19:16 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2011-10-14 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-14 19:16:25 UTC ---
Yes, same issue (which is fixed for 4.7).

*** This bug has been marked as a duplicate of bug 35722 ***


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

end of thread, other threads:[~2011-10-14 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-20 20:52 [Bug c++/50140] New: sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list lcid-fire at gmx dot net
2011-08-20 23:16 ` [Bug c++/50140] [C++0x] " paolo.carlini at oracle dot com
2011-10-14 19:16 ` 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).