[Bug c++/104652] It's impossible to declare non-first target function as a friend

2022-05-16 Thread vorfeed.canal at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104652 --- Comment #2 from Vorfeed Canal --- Thanks for showing a workaround: class Foo { public: explicit Foo(int f) : x(f) {} [[gnu::target("default")]] friend inline Foo bar(Foo& foo) { return Foo(foo.x); } [[gnu::target("

[Bug c++/104652] It's impossible to declare non-first target function as a friend

2022-02-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104652 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Summary|It's impossible to