Commit 6fe61543 by Paolo Carlini Committed by Paolo Carlini

re PR c++/54975 (cv-qualifiers of typedef-name are ignored in lambda expression)

2012-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54975
	* g++.dg/cpp0x/lambda/lambda-typedef.C: New.

From-SVN: r194297
parent 0ed4ab44
2012-12-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54975
* g++.dg/cpp0x/lambda/lambda-typedef.C: New.
2012-12-06 Uros Bizjak <ubizjak@gmail.com>
PR target/55597
......
// PR c++/54975
// { dg-do compile { target c++11 } }
template<typename T>
struct identity
{
typedef T type;
};
template<typename T>
void f()
{
typedef typename T::type A;
int i = 42;
int const &cri = i;
int volatile &vri = i;
[&]() {
A const &x = cri; // Problem here
A volatile &y = vri; // Likewise
};
}
int main()
{
f<identity<int> >();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment