mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 05:10:29 +08:00
re PR c++/51199 ([C++11][DR 547] gcc forms impossible types derived from function types with cv-qualifier-seq)
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51199 * g++.dg/template/pr51199.C: New. From-SVN: r210321
This commit is contained in:
parent
481d8d7005
commit
713106ad88
@ -1,3 +1,8 @@
|
||||
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51199
|
||||
* g++.dg/template/pr51199.C: New.
|
||||
|
||||
2014-05-11 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* gcc.c-torture/execute/20101011-1.c [__MMIX__] (DO_TEST): Define as 0.
|
||||
|
17
gcc/testsuite/g++.dg/template/pr51199.C
Normal file
17
gcc/testsuite/g++.dg/template/pr51199.C
Normal file
@ -0,0 +1,17 @@
|
||||
// PR c++/51199
|
||||
|
||||
typedef void FC() const;
|
||||
|
||||
template<class T>
|
||||
struct add_ref {
|
||||
typedef T& type; // { dg-error "forming reference" }
|
||||
};
|
||||
|
||||
typedef add_ref<FC>::type ref_type;
|
||||
|
||||
template<class T>
|
||||
struct add_ptr {
|
||||
typedef T* type; // { dg-error "forming pointer" }
|
||||
};
|
||||
|
||||
typedef add_ptr<FC>::type ptr_type;
|
Loading…
x
Reference in New Issue
Block a user