[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
Tue Sep 7 10:49:10 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG84169fb67e94: [libc++][NFC] Test span is nothrow trivially destructible (authored by joe_loser).
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.compile.pass.cpp
Index: libcxx/test/std/containers/views/span.cons/span.dtor.compile.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/std/containers/views/span.cons/span.dtor.compile.pass.cpp
@@ -0,0 +1,26 @@
+//===------------------------------ 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>
+constexpr void testDestructor() {
+ static_assert(std::is_nothrow_destructible_v<T>);
+ static_assert(std::is_trivially_destructible_v<T>);
+}
+
+void test() {
+ testDestructor<std::span<int, 1>>();
+ testDestructor<std::span<int>>();
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109286.371125.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210907/2a496c3b/attachment.bin>
More information about the libcxx-commits
mailing list