0_0_37897333_10461.cpp:5:42: error: 'sq' function uses 'auto' type specifier without trailing return type
template <typename T> auto sq (const T &a) { return a * a; }
^
0_0_37897333_10461.cpp:5:42: note: deduced return type only available with -std=c++1y or -std=gnu++1y
0_0_37897333_10461.cpp:6:43: error: 'len' function uses 'auto' type specifier without trailing return type
template <typename T> auto len (const T &a) { return sqrt(sq(a)); }
^
0_0_37897333_10461.cpp:6:43: note: deduced return type only available with -std=c++1y or -std=gnu++1y
0_0_37897333_10461.cpp: In function 'void solve()':
0_0_37897333_10461.cpp:42:35: error: invalid use of 'auto'
double lv, rv, mv, w = len(A - B), h = len(A - D);
^
0_0_37897333_10461.cpp:43:47: error: invalid use of 'auto'
l = a, r = b, i = (B - A) * (1.0 / len(B - A));
^
0_0_37897333_10461.cpp:28:18: error: invalid use of 'auto'
while (sq(l - r) > 1e-16) \
^
0_0_37897333_10461.cpp:44:8: note: in expansion of macro 'binary_search'
t1 = binary_search(A, w);
^
0_0_37897333_10461.cpp:28:18: error: invalid use of 'auto'
while (sq(l - r) > 1e-16) \
^
0_0_37897333_10461.cpp:46:8: note: in expansion of macro 'binary_search'
t2 = binary_search(A, w);
^
0_0_37897333_10461.cpp:47:47: error: invalid use of 'auto'
l = d, r = a, i = (A - D) * (1.0 / len(A - D));
^
0_0_37897333_10461.cpp:28:18: error: invalid use of 'auto'
while (sq(l - r) > 1e-16) \
^
0_0_37897333_10461.cpp:48:8: note: in expansion of macro 'binary_search'
q1 = binary_search(D, h);
^
0_0_37897333_10461.cpp:48:25: error: 'h' was not declared in this scope
q1 = binary_search(D, h);
^
0_0_37897333_10461.cpp:32:29: note: in definition of macro 'binary_search'
if (fabs(i * (m - p)) > y * mv) l = m, lv = mv; \
^
0_0_37897333_10461.cpp:28:18: error: invalid use of 'auto'
while (sq(l - r) > 1e-16) \
^
0_0_37897333_10461.cpp:50:8: note: in expansion of macro 'binary_search'
q2 = binary_search(D, h);
^
0_0_37897333_10461.cpp:50:25: error: 'h' was not declared in this scope
q2 = binary_search(D, h);
^
0_0_37897333_10461.cpp:32:29: note: in definition of macro 'binary_search'
if (fabs(i * (m - p)) > y * mv) l = m, lv = mv; \
^
0_0_37897333_10461.cpp:52:37: error: invalid use of 'auto'
i = (q2 - q1) * (1.0 / len(q2 - q1));
^
0_0_37897333_10461.cpp: In instantiation of 'auto len(const T&) [with T = vec2]':
0_0_37897333_10461.cpp:42:35: required from here
0_0_37897333_10461.cpp:6:63: error: invalid use of 'auto'
template <typename T> auto len (const T &a) { return sqrt(sq(a)); }
^
|