Sorry, I think I misunderstood your problem in my last email. It is not really about friends (though it can cause troubles), but the instantiation moment. David pinned it: the function would be available as long as you instantiate S::X<256>.On Thu, 5 May 2022 at 17:28, Vladimir Grigoriev via Std-Discussion <std-discussion@lists.isocpp.org> wrote:Try this codeIf to writeinline X<256> operator+(const X<256>&, const X<256>&) noexcept;then the error message is<source>:24: undefined reference to `S::operator+(S::X<256u> const&, S::X<256u> const&)'