mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-18 10:34:35 +03:00
Merge pull request #1 from tupaschoal/tupaschoal-decltype-typo
Fix C++11 decltype example
This commit is contained in:
@@ -697,7 +697,7 @@ decltype(c) d = a; // `decltype(c)` is `const int&`
|
|||||||
decltype(123) e = 123; // `decltype(123)` is `int`
|
decltype(123) e = 123; // `decltype(123)` is `int`
|
||||||
int&& f = 1; // `f` is declared as type `int&&`
|
int&& f = 1; // `f` is declared as type `int&&`
|
||||||
decltype(f) g = 1; // `decltype(f) is `int&&`
|
decltype(f) g = 1; // `decltype(f) is `int&&`
|
||||||
decltype((a)) h = x; // `decltype((a))` is int&
|
decltype((a)) h = g; // `decltype((a))` is int&
|
||||||
```
|
```
|
||||||
```c++
|
```c++
|
||||||
template <typename X, typename Y>
|
template <typename X, typename Y>
|
||||||
|
|||||||
Reference in New Issue
Block a user