/in/foo.cc: In function 'int main()':
/in/foo.cc:10:39: error: expected ')' before 'a'
10 | int b=(int)(sqrt)(sqrt a);
| ~ ^~
| )
/in/foo.cc:10:34: error: no matching function for call to 'sqrt(<unresolved overloaded function type>)'
10 | int b=(int)(sqrt)(sqrt a);
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/12/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:95,
from /in/foo.cc:1:
/usr/include/c++/12/bits/valarray_after.h:458:5: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_ValArray, _Tp>, _Tp> std::sqrt(const valarray<_Tp>&)'
458 | _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/valarray_after.h:458:5: note: template argument deduction/substitution failed:
/in/foo.cc:10:34: note: mismatched types 'const std::valarray<_Tp>' and 'float(float)'
10 | int b=(int)(sqrt)(sqrt a);
| ~~~~~~^~~~~~~
/in/foo.cc:10:34: note: mismatched types 'const std::valarray<_Tp>' and 'long double(long double)'
/in/foo.cc:10:34: note: mismatched types 'const std::valarray<_Tp>' and 'double(double) noexcept' {aka 'double(double)'}
/in/foo.cc:10:34: note: couldn't deduce template parameter '_Tp'
/usr/include/c++/12/bits/valarray_after.h:458:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_Expr, _Dom>, typename _Dom::value_type> std::sqrt(const _Expr<_Dom1, typename _Dom1::value_type>&)'
458 | _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/valarray_after.h:458:5: note: template argument deduction/substitution failed:
/in/foo.cc:10:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'float(float)'
10 | int b=(int)(sqrt)(sqrt a);
| ~~~~~~^~~~~~~
/in/foo.cc:10:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'long double(long double)'
/in/foo.cc:10:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'double(double) noexcept' {aka 'double(double)'}
/in/foo.cc:10:34: note: couldn't deduce template parameter '_Dom'
In file included from /usr/include/c++/12/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:54:
/usr/include/c++/12/complex:929:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::sqrt(const complex<_Tp>&)'
929 | sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
| ^~~~
/usr/include/c++/12/complex:929:5: note: template argument deduction/substitution failed:
/in/foo.cc:10:34: note: mismatched types 'const std::complex<_Tp>' and 'float(float)'
10 | int b=(int)(sqrt)(sqrt a);
| ~~~~~~^~~~~~~
/in/foo.cc:10:34: note: mismatched types 'const std::complex<_Tp>' and 'long double(long double)'
/in/foo.cc:10:34: note: mismatched types 'const std::complex<_Tp>' and 'double(double) noexcept' {aka 'double(double)'}
/in/foo.cc:10:34: note: couldn't deduce template parameter '_Tp'
In file included from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:41:
/usr/include/c++/12/cmath:475:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp)'
475 | sqrt(_Tp __x)
| ^~~~
/usr/include/c++/12/cmath:475:5: note: template argument deduction/substitution failed:
/in/foo.cc:10:34: note: couldn't deduce template parameter '_Tp'
10 | int b=(int)(sqrt)(sqrt a);
| ~~~~~~^~~~~~~
In file included from /usr/include/features.h:489,
from /usr/include/x86_64-linux-gnu/c++/12/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/12/bits/c++config.h:655,
from /usr/include/c++/12/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:33:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:143:1: note: candidate: 'double sqrt(double)'
143 | __MATHCALL (sqrt,, (_Mdouble_ __x));
| ^~~~~~~~~~
In file included from /usr/include/c++/12/cmath:45:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:143:1: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
143 | __MATHCALL (sqrt,, (_Mdouble_ __x));
| ^
/usr/include/c++/12/cmath:467:3: note: candidate: 'constexpr long double std::sqrt(long double)'
467 | sqrt(long double __x)
| ^~~~
/usr/include/c++/12/cmath:467:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
467 | sqrt(long double __x)
| ~~~~~~~~~~~~^~~
/usr/include/c++/12/cmath:463:3: note: candidate: 'constexpr float std::sqrt(float)'
463 | sqrt(float __x)
| ^~~~
/usr/include/c++/12/cmath:463:14: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
463 | sqrt(float __x)
| ~~~~~~^~~