[libcxx-commits] [PATCH] D58019: Add is_nothrow_convertible (P0758R1)

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 11 09:07:55 PST 2019


ldionne requested changes to this revision.
ldionne added a reviewer: ldionne.
ldionne added inline comments.


================
Comment at: include/type_traits:1561
+>
+struct __is_nothrow_convertable_helper
+{
----------------
Should be `__is_nothrow_convertible_helper` instead.


================
Comment at: test/libcxx/type_traits/is_nothrow_convertible.pass.cpp:2
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
----------------
This should be `test/std/type_traits/is_nothrow_convertible.pass.cpp` because it's not a libc++ specific behavior.


================
Comment at: test/libcxx/type_traits/is_nothrow_convertible.pass.cpp:31
+int main(int, char**) {
+    assert((std::is_nothrow_convertible<int, double>::value));
+    assert(!(std::is_nothrow_convertible<int, char*>::value));
----------------
Those should be `static_assert`s.


================
Comment at: test/libcxx/type_traits/is_nothrow_convertible.pass.cpp:41
+    assert(!(std::is_nothrow_convertible_v<A, B>));
+    assert((std::is_nothrow_convertible_v<D, C>));
+    
----------------
You have tests where `To` and `From` are complete types. Please add tests for:
- `cv void` types
- arrays of unknown bounds
- arrays of known bounds
- function types


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58019/new/

https://reviews.llvm.org/D58019





More information about the libcxx-commits mailing list