public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66108] New: cv-qualification deducation failure on conversion operator
@ 2015-05-11 16:33 barry.revzin at gmail dot com
  2015-05-11 16:34 ` [Bug c++/66108] " barry.revzin at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: barry.revzin at gmail dot com @ 2015-05-11 16:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66108

            Bug ID: 66108
           Summary: cv-qualification deducation failure on conversion
                    operator
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Consider this code (taken from SO question)

#include <iostream>

struct A {
    template <class T> operator T***()
    {
        static_assert(std::is_same<T, int>::value, "oops");
    }
};

int main(){
    A a;
    const int * const * const * p1 = a;
}

This is exactly the example taken from the standard in [temp.deduct.conv]/7,
yet on gcc 5.1, the static assertion fails because T is deduced as const int
rather than int.


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

end of thread, other threads:[~2024-03-13  0:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-11 16:33 [Bug c++/66108] New: cv-qualification deducation failure on conversion operator barry.revzin at gmail dot com
2015-05-11 16:34 ` [Bug c++/66108] " barry.revzin at gmail dot com
2021-08-09 23:14 ` [Bug c++/66108] incorrect cv-qualification deduction on conversion operator template pinskia at gcc dot gnu.org
2024-03-13  0:26 ` pinskia at gcc dot gnu.org
2024-03-13  0:29 ` [Bug c++/66108] [CWG 349] " pinskia 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).