Наблюдение random.tcc
Исходный файл STL нашел следующее определение оператора:
template<typename _IntType>
template<typename _UniformRandomNumberGenerator>
typename geometric_distribution<_IntType>::result_type
geometric_distribution<_IntType>::
operator()(_UniformRandomNumberGenerator& __urng,
const param_type& __param)
{
// About the epsilon thing see this thread:
// http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00971.html
const double __naf =
(1 - std::numeric_limits<double>::epsilon()) / 2;
// The largest _RealType convertible to _IntType.
const double __thr =
std::numeric_limits<_IntType>::max() + __naf;
__detail::_Adaptor<_UniformRandomNumberGenerator, double>
__aurng(__urng);
double __cand;
do
__cand = std::floor(std::log(1.0 - __aurng()) / __param._M_log_1_p);
while (__cand >= __thr);
return result_type(__cand + __naf);
}
Google и различные ссылки на C ++ не помогли мне понять, что это значит, когда в строке два объявления template
, Пожалуйста, помогите, кто знает.