Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I add a deduction guide to `std` namespace?

Suppose I want to make a new deduction guide making the following possible ?

std::string str;
std::basic_string_view sv = str;

Would that be an Ok customization ?

like image 682
darune Avatar asked Nov 22 '19 10:11

darune


1 Answers

[namespace.std]/2.4:

The behavior of a C++ program is undefined if it declares [...] a deduction guide for any standard library class template.

like image 189
L. F. Avatar answered Sep 20 '22 23:09

L. F.