diff --git a/include/angle.h b/include/angle.h index f86cf18..9787bc9 100644 --- a/include/angle.h +++ b/include/angle.h @@ -1172,7 +1172,7 @@ class angle_distribution AM_CHECK_NARROWING(typename Turn::type,typename ValueDistr::result_type) public: - using param_type = num::param_t; + using param_type = typename ValueDistr::param_type; using numeric_type = typename ValueDistr::result_type; using result_type = angle; @@ -1265,7 +1265,7 @@ class uniform_angle_distribution : public: //--------------------------------------------------------------- using numeric_type = typename Turn::type; - using param_type = num::param_t; + using param_type = typename base_t_::param_type; //--------------------------------------------------------------- explicit diff --git a/include/distributions.h b/include/distributions.h index 717fa0a..254e4ca 100644 --- a/include/distributions.h +++ b/include/distributions.h @@ -57,13 +57,11 @@ using uniform_number_distribution = typename - /***************************************************************************** * * * * - * *****************************************************************************/ template class distribution_adapter @@ -73,7 +71,7 @@ class distribution_adapter public: //--------------------------------------------------------------- using result_type = Result; - using param_type = param_t; + using param_type = typename ValueDistribution::param_type; //--------------------------------------------------------------- @@ -163,9 +161,7 @@ using uniform_distribution_adapter = distribution_adapter> >; - } // namespace num - } // namespace am #endif // AMLIB_GEOMETRY_CREATION_POINTS_H_ diff --git a/include/param.h b/include/param.h deleted file mode 100644 index 199889d..0000000 --- a/include/param.h +++ /dev/null @@ -1,70 +0,0 @@ -/***************************************************************************** - * - * AM numeric facilities - * - * released under MIT license - * - * 2008-2017 André Müller - * - *****************************************************************************/ - -#ifndef AMLIB_NUMERIC_PARAM_H_ -#define AMLIB_NUMERIC_PARAM_H_ - - -#include - - -namespace am { -namespace num { - - -namespace detail { - -//------------------------------------------------------------------- -template -constexpr auto -check_has_param(int) - -> decltype( - std::declval(), - std::declval().param(), - std::true_type{}); -//--------------------------------------------------------- -template -constexpr auto -check_has_param(long) - -> std::false_type; - -} // namespace detail - - - -//------------------------------------------------------------------- -template -struct has_param : public - decltype(detail::check_has_param(0)) -{}; - - - -//------------------------------------------------------------------- -template::value> -struct param { - using type = T; -}; - -template -struct param { - using type = typename T::param_type; -}; - -template -using param_t = typename param::type; - - - -} // namespace num -} // namespace am - - -#endif