public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55029] New: constexpr bug: lvalue required?
@ 2012-10-22 23:18 luto at mit dot edu
  2012-10-22 23:34 ` [Bug c++/55029] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: luto at mit dot edu @ 2012-10-22 23:18 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55029
           Summary: constexpr bug: lvalue required?
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: luto@mit.edu


This code:

-----
template<int x>
class A
{
public:
  constexpr A() : val_(0) {}
  static constexpr A Func(int units)
  {
    return A();
  }

  template<int y> explicit operator A<y>() const;

private:
  int val_;
  A(double);
};

struct Foo
{
  static constexpr A<2> z = A<2>::Func(0);
};
-----

fails on gcc 4.6 with 20:41: error: lvalue required as unary ‘&’ operand

gcc 4.7 and trunk is okay.


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

* [Bug c++/55029] constexpr bug: lvalue required?
  2012-10-22 23:18 [Bug c++/55029] New: constexpr bug: lvalue required? luto at mit dot edu
@ 2012-10-22 23:34 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-22 23:34 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-22 23:33:57 UTC ---
Isn't a regression, thus we are fine.


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

end of thread, other threads:[~2012-10-22 23:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 23:18 [Bug c++/55029] New: constexpr bug: lvalue required? luto at mit dot edu
2012-10-22 23:34 ` [Bug c++/55029] " paolo.carlini at oracle dot com

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).