1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 // basic_string<charT,traits,Allocator>&
14 // operator=(basic_string<charT,traits,Allocator>&& str); // constexpr since C++20
19 #include "test_macros.h"
21 TEST_CONSTEXPR_CXX20
bool test() {
22 // Test that assignment from {} and {ptr, len} are allowed and are not
25 std::string s
= "hello world";
30 std::string s
= "hello world";
38 int main(int, char**) {
41 static_assert(test());