================ @@ -27,6 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template<class _RealType = double> class _LIBCPP_TEMPLATE_VIS uniform_real_distribution { + static_assert(std::is_floating_point<_RealType>::value, "result_type must be a floating point type"); ---------------- philnik777 wrote:
This needs a test. You can take a look at `libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.verify.cpp` for an example of how to check static assertions. https://github.com/llvm/llvm-project/pull/70485 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits