diff --git a/libcxx/test/std/concepts/concepts.lang/concept.swappable/cpo.compile.pass.cpp b/libcxx/test/std/concepts/concepts.lang/concept.swappable/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/concepts/concepts.lang/concept.swappable/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/iterators/predef.iterators/iterators.common/cpo.compile.pass.cpp b/libcxx/test/std/iterators/predef.iterators/iterators.common/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/iterators/predef.iterators/iterators.common/cpo.compile.pass.cpp @@ -0,0 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); +static_assert(customization_point_object); diff --git a/libcxx/test/std/language.support/cmp/cmp.alg/cpo.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/language.support/cmp/cmp.alg/cpo.compile.pass.cpp @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.access/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.access/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.access/cpo.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.adaptors/range.all/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.adaptors/range.all/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.adaptors/range.counted/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.counted/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.adaptors/range.counted/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/cpo.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/cpo.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/cpo.compile.pass.cpp @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges + +#include + +#include "customization_point_object.h" + +static_assert(customization_point_object); diff --git a/libcxx/test/support/customization_point_object.h b/libcxx/test/support/customization_point_object.h new file mode 100644 --- /dev/null +++ b/libcxx/test/support/customization_point_object.h @@ -0,0 +1,19 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// +#ifndef TEST_SUPPORT_CUSTOMIZATION_POINT_OBJECT_H +#define TEST_SUPPORT_CUSTOMIZATION_POINT_OBJECT_H + +#include +#include + +// Test for basic properties of C++20 16.3.3.3.6 [customization.point.object]. +template +concept customization_point_object = + (std::is_class_v || std::is_union_v)&&__is_literal_type(T) && std::semiregular>; + +#endif // TEST_SUPPORT_CUSTOMIZATION_POINT_OBJECT_H