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
This commit is contained in:
Paolo Carlini 2009-07-12 23:25:29 +00:00 committed by Paolo Carlini
parent b9c6b842a9
commit 026ec377e9
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,8 @@
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>
PR testsuite/40699

View File

@ -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<typename _Tp, typename _Up, typename... _Vp>