Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / strings / basic.string / string.cons / nullptr.compile.pass.cpp
blobfd6232ce72454becfc9604eb8e494a8f6b53eece
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
11 // <string>
13 // basic_string(nullptr_t) = delete; // C++23
14 // basic_string& operator=(nullptr_t) = delete; // C++23
16 #include <string>
17 #include <type_traits>
19 static_assert(!std::is_convertible_v<decltype(nullptr), std::string>);
20 static_assert(!std::is_constructible_v<std::string, decltype(nullptr)>);
21 static_assert(!std::is_assignable_v<std::string, decltype(nullptr)>);