[libcxx-commits] [PATCH] D109286: [libc++][NFC] Test span is nothrow trivially destructible
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 4 21:47:48 PDT 2021
jloser updated this revision to Diff 370781.
jloser added a comment.
Explicitly include <type_traits> in test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109286/new/
https://reviews.llvm.org/D109286
Files:
libcxx/test/std/containers/views/span.cons/span.dtor.pass.cpp
Index: libcxx/test/std/containers/views/span.cons/span.dtor.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/std/containers/views/span.cons/span.dtor.pass.cpp
@@ -0,0 +1,28 @@
+//===------------------------------ span ---------------------------------===//
+//
+// 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
+
+// <span>
+
+// ~span() = default;
+
+#include <span>
+#include <type_traits>
+
+template <class T>
+void testDestructor() {
+ static_assert(std::is_nothrow_destructible_v<T>);
+ static_assert(std::is_trivially_destructible_v<T>);
+}
+
+int main(int, char**) {
+ testDestructor<std::span<int, 1> >();
+ testDestructor<std::span<int> >();
+
+ return 0;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109286.370781.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210905/6bb4b3cd/attachment.bin>
More information about the libcxx-commits
mailing list