public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56380] New: Const/reference mutable members are not always rejected in class templates
@ 2013-02-18 17:00 pl.smith.mail at gmail dot com
  2013-02-18 17:50 ` [Bug c++/56380] " redi at gcc dot gnu.org
  2013-08-22 10:26 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: pl.smith.mail at gmail dot com @ 2013-02-18 17:00 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56380
           Summary: Const/reference mutable members are not always
                    rejected in class templates
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pl.smith.mail@gmail.com


GCC (all versions?) accepts mutable members of const-qualified/reference type
in class templates, if the const-ness/reference-ness is introduced during
instantiation:

template <typename T>
struct X {
  X();
  mutable T x;
};

X<const int> a; // no error
X<int&> b;      // no error


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

* [Bug c++/56380] Const/reference mutable members are not always rejected in class templates
  2013-02-18 17:00 [Bug c++/56380] New: Const/reference mutable members are not always rejected in class templates pl.smith.mail at gmail dot com
@ 2013-02-18 17:50 ` redi at gcc dot gnu.org
  2013-08-22 10:26 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-18 17:50 UTC (permalink / raw)
  To: gcc-bugs


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-02-18
     Ever Confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-18 17:50:16 UTC ---
The mutable reference case was only fixed fairly recently for non-templates, as
PR 33558, it looks like a later check is needed to handle templates.


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

* [Bug c++/56380] Const/reference mutable members are not always rejected in class templates
  2013-02-18 17:00 [Bug c++/56380] New: Const/reference mutable members are not always rejected in class templates pl.smith.mail at gmail dot com
  2013-02-18 17:50 ` [Bug c++/56380] " redi at gcc dot gnu.org
@ 2013-08-22 10:26 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-08-22 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
   Target Milestone|---                         |4.9.0

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

end of thread, other threads:[~2013-08-22 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 17:00 [Bug c++/56380] New: Const/reference mutable members are not always rejected in class templates pl.smith.mail at gmail dot com
2013-02-18 17:50 ` [Bug c++/56380] " redi at gcc dot gnu.org
2013-08-22 10:26 ` 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).