Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/vect/pr60836.cc @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
line wrap: on
line source
// { dg-do compile } int a, b; typedef double (*NormFunc) (const int &); int & max (int &p1, int &p2) { if (p1 < p2) return p2; return p1; } struct A { int operator () (int p1, int p2) { return max (p1, p2); } }; template < class, class > double norm_ (const int &) { char c, d; A e; for (; a; a++) { b = e (b, d); b = e (b, c); } } void norm () { static NormFunc f = norm_ < int, A >; f = 0; }