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.