This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61648] g++ accepts literal operator friends for non-template classes but not for *template* classes


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

Ed Smith-Rowland <3dw4rd at verizon dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |3dw4rd at verizon dot net

--- Comment #1 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Putting a valid numeric literal operator template works:

#include <cstddef>
struct B{};

template<char... Str>
  B operator"" _c() { return B(); }

template<typename T>
class C
{
  template<char...>
    friend B operator"" _c();
};

int main() { return 0; }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]