diff --git a/Siv3D/include/Siv3D/DiscreteDistribution.hpp b/Siv3D/include/Siv3D/DiscreteDistribution.hpp index 5b153d35b..e87a841b6 100644 --- a/Siv3D/include/Siv3D/DiscreteDistribution.hpp +++ b/Siv3D/include/Siv3D/DiscreteDistribution.hpp @@ -92,11 +92,11 @@ namespace s3d template [[nodiscard]] - inline decltype(auto) DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight, URBG&& urbg); + inline auto DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight, URBG&& urbg); template [[nodiscard]] - inline decltype(auto) DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight); + inline auto DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight); } # include "detail/DiscreteDistribution.ipp" diff --git a/Siv3D/include/Siv3D/detail/DiscreteDistribution.ipp b/Siv3D/include/Siv3D/detail/DiscreteDistribution.ipp index aaf61c37f..1fb298f72 100644 --- a/Siv3D/include/Siv3D/detail/DiscreteDistribution.ipp +++ b/Siv3D/include/Siv3D/detail/DiscreteDistribution.ipp @@ -106,14 +106,14 @@ namespace s3d } template - inline decltype(auto) DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight, URBG&& urbg) + inline auto DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight, URBG&& urbg) { assert(ilist.size() != 0); return *(ilist.begin() + weight(std::forward(urbg))); } template - inline decltype(auto) DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight) + inline auto DiscreteSample(std::initializer_list ilist, DiscreteDistribution& weight) { return DiscreteSample(ilist, weight, GetDefaultRNG()); }