From 883c19600181fdaef07ddc6557971f9c33b2c676 Mon Sep 17 00:00:00 2001 From: Peter-Levine Date: Tue, 11 Jul 2017 22:50:00 -0400 Subject: [PATCH 1/2] Named rvalue references are treated as lvalue references --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 3b31b55..592fc54 100644 --- a/README.md +++ b/README.md @@ -731,8 +731,6 @@ decltype(a) b = a; // `decltype(a)` is `int` const int& c = a; // `c` is declared as type `const int&` decltype(c) d = a; // `decltype(c)` is `const int&` decltype(123) e = 123; // `decltype(123)` is `int` -int&& f = 1; // `f` is declared as type `int&&` -decltype(f) g = 1; // `decltype(f) is `int&&` decltype((a)) h = g; // `decltype((a))` is int& ``` ```c++ From c3feeca5f29d897aac7ca53acda63f8cbdb6d108 Mon Sep 17 00:00:00 2001 From: Anthony Calandra Date: Thu, 13 Jul 2017 08:24:17 -0400 Subject: [PATCH 2/2] Revert "Named rvalue references are treated as lvalue references" --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 592fc54..3b31b55 100644 --- a/README.md +++ b/README.md @@ -731,6 +731,8 @@ decltype(a) b = a; // `decltype(a)` is `int` const int& c = a; // `c` is declared as type `const int&` decltype(c) d = a; // `decltype(c)` is `const int&` decltype(123) e = 123; // `decltype(123)` is `int` +int&& f = 1; // `f` is declared as type `int&&` +decltype(f) g = 1; // `decltype(f) is `int&&` decltype((a)) h = g; // `decltype((a))` is int& ``` ```c++