From 9c48adc38c34dd2ff2790633b68ad11bd38012b0 Mon Sep 17 00:00:00 2001 From: paolo Date: Sun, 12 Jul 2009 23:25:29 +0000 Subject: [PATCH] 2009-07-12 Paolo Carlini * include/std/type_traits (common_type): Remove workaround for PR36628, now fixed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149537 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/std/type_traits | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f9cac8c..97a165d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2009-07-12 Paolo Carlini + + * include/std/type_traits (common_type): Remove workaround for + PR36628, now fixed. + 2009-07-11 Richard Sandiford PR testsuite/40699 diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index ce9ee1b..94c40df 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -580,13 +580,8 @@ namespace std static _Tp&& __t(); static _Up&& __u(); - // HACK: Prevents optimization of ?: in the decltype - // expression when the condition is the literal, "true". - // See, PR36628. - static bool __true_or_false(); - public: - typedef decltype(__true_or_false() ? __t() : __u()) type; + typedef decltype(true ? __t() : __u()) type; }; template -- 2.7.4