https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85466
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jwakely.gcc at gmail dot com Component|c++ |libstdc++ --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- I see sth like template<typename _RealType, size_t __bits, typename _UniformRandomNumberGenerator> _RealType generate_canonical(_UniformRandomNumberGenerator& __urng) { ... __ret = std::nextafter(_RealType(1), _RealType(0)); instantiated as _RealType std::generate_canonical(_UniformRandomNumberGenerator&) [with _RealType = double; long unsigned int __bits = 53; _UniformRandomNumberGenerator = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>] (struct mersenne_twister_engine & __urng) { ... const long double __r; ^^^ (but that's unused it seems) ... __ret = nextafter (1.0e+0, 0.0); and cmath containing constexpr float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } constexpr long double nextafter(long double __x, long double __y) { return __builtin_nextafterl(__x, __y); } template<typename _Tp, typename _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type nextafter(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return nextafter(__type(__x), __type(__y)); } which means std::nextafter will use the long double variant?