[libcxx-commits] [libcxx] [libc++][chrono] Implements duration Rep constraints. (PR #80539)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 4 07:20:58 PST 2024


================
@@ -29,6 +30,28 @@ class Rep
 
 struct NotARep {};
 
+#if TEST_STD_VER >= 11
+// Several duration operators take a Rep parameter. Before LWG3050 this
+// parameter was constrained to be convertible from a non-const object,
+// but the code always uses a const object. So the function was SFINEA's
+// away for this type. LWG3050 fixes the constrain to use a const
----------------
h-vetinari wrote:

```suggestion
// but the code always uses a const object. So the function was SFINAE'd
// away for this type. LWG3050 fixes the constraint to use a const
```

https://github.com/llvm/llvm-project/pull/80539


More information about the libcxx-commits mailing list