From 3fd83c4bbd9e1283636fca16bc5105ce5a1c8990 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 11 Jul 2015 02:28:40 +0100 Subject: [PATCH] fix a subtle bug in AddRvalueReference --- octa/type_traits.hh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/octa/type_traits.hh b/octa/type_traits.hh index 4466ba8..98f3fa4 100644 --- a/octa/type_traits.hh +++ b/octa/type_traits.hh @@ -843,9 +843,8 @@ using AddPointer = typename detail::AddPointerBase::Type; /* add lvalue reference */ namespace detail { - template struct AddLr { using Type = T &; }; - template struct AddLr { using Type = T &; }; - template struct AddLr { using Type = T &; }; + template struct AddLr { using Type = T &; }; + template struct AddLr { using Type = T &; }; template<> struct AddLr { using Type = void; }; @@ -863,9 +862,7 @@ namespace detail { /* add rvalue reference */ namespace detail { - template struct AddRr { using Type = T &&; }; - template struct AddRr { using Type = T &&; }; - template struct AddRr { using Type = T &&; }; + template struct AddRr { using Type = T &&; }; template<> struct AddRr { using Type = void; };