mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Merge pull request #1198 from ianhattendorf/SL-str-12-cpp-14
SL.str.12: s suffix is available in C++14
This commit is contained in:
@@ -19175,13 +19175,13 @@ Direct expression of an idea minimizes mistakes.
|
||||
|
||||
auto pp1 = make_pair("Tokyo", 9.00); // {C-style string,double} intended?
|
||||
pair<string, double> pp2 = {"Tokyo", 9.00}; // a bit verbose
|
||||
auto pp3 = make_pair("Tokyo"s, 9.00); // {std::string,double} // C++17
|
||||
auto pp3 = make_pair("Tokyo"s, 9.00); // {std::string,double} // C++14
|
||||
pair pp4 = {"Tokyo"s, 9.00}; // {std::string,double} // C++17
|
||||
|
||||
|
||||
##### Note
|
||||
|
||||
C++17
|
||||
C++14
|
||||
|
||||
##### Enforcement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user