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(path const&) 16 17 #include "filesystem_include.h" 18 #include <cassert> 19 #include <string> 20 #include <type_traits> 21 22 #include "test_macros.h" 23 24 main(int,char **)25int main(int, char**) { 26 using namespace fs; 27 static_assert(std::is_copy_constructible<path>::value, ""); 28 static_assert(!std::is_nothrow_copy_constructible<path>::value, "should not be noexcept"); 29 const std::string s("foo"); 30 const path p(s); 31 path p2(p); 32 assert(p.string() == s); 33 assert(p2.string() == s); 34 35 return 0; 36 } 37