C++ Logo


Advanced search

Subject: C++ 20. An explicit specialization of a template friend function with a default template argument.
From: Vladimir Grigoriev (vlad.moscow_at_[hidden])
Date: 2019-08-28 12:24:52

In the C++ 20 Standard (13.1 Template parameters) there is written

11. .... If a friend function template declaration specifies a default template-argument, that declaration shall be a definition and shall be the only declaration of the function template in the translation unit.

So what to do in this case when an explicit specialization of the function is required? The name of the template is not visible outside the class where it is defined.

With best regards,
Vlad from Moscow

You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups