gcc/testsuite/g++.dg/template/local-fn2.C
raw| 1 | // PR c++/80856 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename T> |
| 5 | inline T WrapToCycle(T degrees) |
| 6 | { |
| 7 | int Wrap(int x, int lower_bound, int upper_bound); |
| 8 | |
| 9 | auto p = Wrap; |
| 10 | p (1, 0, 360); |
| 11 | |
| 12 | double Wrap(double x, int lower_bound, int upper_bound); |
| 13 | |
| 14 | Wrap(1, 0, 360); |
| 15 | return Wrap(degrees, 0, 360); |
| 16 | } |
| 17 | |
| 18 | void GenerateOldReportPage() |
| 19 | { |
| 20 | WrapToCycle(0); |
| 21 | } |