re PR c++/56450 (ICE with SFINAE when detecting non-static member variable)
/cp 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56450 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR. /testsuite 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56450 * g++.dg/cpp0x/decltype52.C: New. From-SVN: r198381
This commit is contained in:
parent
01187df097
commit
4882d82a27
|
@ -1,3 +1,8 @@
|
|||
2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/56450
|
||||
* semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
|
||||
|
||||
2013-04-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* error.c (cp_print_error_function): Adjust file_name_as_prefix
|
||||
|
|
|
@ -5398,6 +5398,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
|
|||
break;
|
||||
|
||||
case COMPONENT_REF:
|
||||
case COMPOUND_EXPR:
|
||||
mark_type_use (expr);
|
||||
type = is_bitfield_expr_with_lowered_type (expr);
|
||||
if (!type)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/56450
|
||||
* g++.dg/cpp0x/decltype52.C: New.
|
||||
|
||||
2013-04-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
N3472 binary constants
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// PR c++/56450
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template<typename T>
|
||||
T&& declval();
|
||||
|
||||
template<typename, typename>
|
||||
struct is_same
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<typename T>
|
||||
struct is_same<T, T>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
struct A { static const int dummy = 0; };
|
||||
|
||||
static_assert(is_same<decltype(declval<A>().dummy), const int>::value, "");
|
||||
static_assert(!is_same<decltype(declval<A>().dummy), const int&>::value, "");
|
Loading…
Reference in New Issue