mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08: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:
commit
20d9f42674
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user