[libcxx-commits] [PATCH] D105205: [libcxx][ranges] implements dangling, borrowed_iterator_t, borrowed_subrange_t

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 9 07:16:32 PDT 2021


ldionne requested changes to this revision.
ldionne added a subscriber: DavidSpickett.
ldionne added a comment.
This revision now requires changes to proceed.

@DavidSpickett I see the Linaro bots have started failing when building `libunwind`. I looked into it a little bit, but I didn't see any recent changes in `libunwind`. Did you make changes to your bots?



================
Comment at: libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp:38-42
+template<int> struct S { };
+static_assert(std::is_nothrow_constructible_v<std::ranges::dangling>);
+static_assert(std::is_nothrow_constructible_v<std::ranges::dangling, S<0>>);
+static_assert(std::is_nothrow_constructible_v<std::ranges::dangling, S<0>, S<1>>);
+static_assert(std::is_nothrow_constructible_v<std::ranges::dangling, S<0>, S<1>, S<2>>);
----------------
I think this belongs to `dangling.compile.pass.cpp`.


================
Comment at: libcxx/test/std/ranges/range.utility/range.dangling/dangling.compile.pass.cpp:1
+//===----------------------------------------------------------------------===//
+//
----------------
This should be a `.pass.cpp` test, and we should test that we can actually run (not only compile) code that calls the variadic constructor (and the default constructor), since it's defined with an empty body in the Standard. As it stands, I think our tests would pass if we had not defined the constructor at all and only declared it, but we would be non-conforming.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105205



More information about the libcxx-commits mailing list