re PR c++/48522 ([C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.)

2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/48522
	* g++.dg/cpp0x/pr48522.C: New.

From-SVN: r173598
This commit is contained in:
Paolo Carlini 2011-05-09 23:24:01 +00:00 committed by Paolo Carlini
parent 65dbe23923
commit 0410e66d03
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48522
* g++.dg/cpp0x/pr48522.C: New.
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48735

View File

@ -0,0 +1,24 @@
// { dg-options "-std=c++0x" }
template <typename T>
struct Handle
{
Handle(T& t);
};
template<class T>
struct Class {
struct Struct {} data;
void f();
void g();
};
template<class T>
void Class<T>::f() {
Handle< decltype((data)) > handle(data);
}
template<class T>
void Class<T>::g() {
Handle< decltype((data)) > handle(data);
}