================ @@ -0,0 +1,76 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23 + +// <numeric> + +// template<class R, class T> +// constexpr R saturate_cast(T x) noexcept; // freestanding + +#include <concepts> +#include <numeric> + +template <typename R, typename T> +concept CanDo = requires(T x) { + { std::saturate_cast<R>(x) } -> std::same_as<R>; +}; + +template <typename R, typename T> +constexpr void test_constraint_success() { + static_assert(CanDo<R, T>); ---------------- mordante wrote:
```suggestion static_assert(CanDo<R, T>); static_assert(CanDo<T, R>); ``` https://github.com/llvm/llvm-project/pull/77967 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits