[libcxx-commits] [libcxx] [libc++] LWG3382: NTTP for `pair` and `array` (PR #85811)

Jakub Mazurkiewicz via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 14 06:56:22 PDT 2024


================
@@ -0,0 +1,80 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// <array>
+
+// array<T, N> is a structural type ([temp.param]) if T is a structural type.
----------------
JMazurkiewicz wrote:

I'm testing whether `array` (or `pair`) is a structural type based on its template parameters. LWG-3382 states that:
* pair<T, U> is a structural type (13.2 [[temp.param]](https://wg21.link/temp.param)) if T and U are both structural types
* array<T, N> is a structural type (13.2 [[temp.param]](https://wg21.link/temp.param)) if T is a structural type

IMHO those tests address the LWG issue, although they might be an overkill.

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


More information about the libcxx-commits mailing list