mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-15 06:54:05 +08:00
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:
parent
b9c6b842a9
commit
026ec377e9
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user