Commit 026ec377 by Paolo Carlini Committed by Paolo Carlini

re PR c++/36628 ([c++0x] incorrect decltype() handling of conditional operator)

2009-07-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (common_type): Remove workaround for
	PR36628, now fixed.

From-SVN: r149537
parent b9c6b842
2009-07-12 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/type_traits (common_type): Remove workaround for
PR36628, now fixed.
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com> 2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699 PR testsuite/40699
......
...@@ -580,13 +580,8 @@ namespace std ...@@ -580,13 +580,8 @@ namespace std
static _Tp&& __t(); static _Tp&& __t();
static _Up&& __u(); 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: public:
typedef decltype(__true_or_false() ? __t() : __u()) type; typedef decltype(true ? __t() : __u()) type;
}; };
template<typename _Tp, typename _Up, typename... _Vp> template<typename _Tp, typename _Up, typename... _Vp>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment