mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-17 01:54:36 +03:00
Update README.md (#136)
* Update README.md * Update CPP17.md * Update CPP11.md * Improve the ref-qualified member functions code even more. --------- Co-authored-by: Anthony Calandra <anthony@anthony-calandra.com>
This commit is contained in:
2
CPP17.md
2
CPP17.md
@@ -369,7 +369,7 @@ std::vector v{ 1, 2, 3 }; // deduces std::vector<int>
|
||||
std::mutex mtx;
|
||||
auto lck = std::lock_guard{ mtx }; // deduces to std::lock_guard<std::mutex>
|
||||
|
||||
auto p = new std::pair{ 1.0, 2.0 }; // deduces to std::pair<double, double>
|
||||
auto p = new std::pair{ 1.0, 2.0 }; // deduces to std::pair<double, double>*
|
||||
```
|
||||
|
||||
For user-defined types, *deduction guides* can be used to guide the compiler how to deduce template arguments if applicable:
|
||||
|
||||
Reference in New Issue
Block a user