gcc/testsuite/g++.dg/overload/conv-op2.C
raw| 1 | // PR c++/81311 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct function |
| 5 | { |
| 6 | template<class F> function(F) { } |
| 7 | }; |
| 8 | |
| 9 | struct ref |
| 10 | { |
| 11 | operator function&() const = delete; |
| 12 | } r; |
| 13 | |
| 14 | struct val |
| 15 | { |
| 16 | operator function() const = delete; |
| 17 | } v; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | function f1(r); |
| 22 | function f2(v); |
| 23 | } |