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 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++03 10 11 // <filesystem> 12 13 // class path 14 15 // path& operator=(path const&); 16 17 #include "filesystem_include.h" 18 #include <type_traits> 19 #include <cassert> 20 21 #include "test_macros.h" 22 23 main(int,char **)24int main(int, char**) { 25 using namespace fs; 26 static_assert(std::is_copy_assignable<path>::value, ""); 27 static_assert(!std::is_nothrow_copy_assignable<path>::value, "should not be noexcept"); 28 const std::string s("foo"); 29 const path p(s); 30 path p2; 31 path& pref = (p2 = p); 32 assert(p.string() == s); 33 assert(p2.string() == s); 34 assert(&pref == &p2); 35 36 return 0; 37 } 38