repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
pr63506-2.C
blob
b6b74e5359cf2be6302ca1e57c5a28f5a86a2ea1
1
// { dg-do compile { target c++11 } }
2
3
struct proxy {};
4
5
struct iterator
6
{
7
proxy operator*() { return proxy(); }
8
9
proxy operator[](int i) { return proxy(); }
10
};
11
12
//#define DEACTIVATE
13
14
#ifndef DEACTIVATE
15
template<typename T = int>
16
#endif
17
void foo(iterator it)
18
{
19
auto&& x = *it;
20
auto&& y = it[1];
21
}
22
23
int main()
24
{
25
iterator it;
26
foo(it);
27
}