Home | History | Annotate | Download | only in path.construct
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // UNSUPPORTED: c++98, c++03
     11 
     12 // <experimental/filesystem>
     13 
     14 // class path
     15 
     16 // path(path const&)
     17 
     18 #include <experimental/filesystem>
     19 #include <type_traits>
     20 #include <cassert>
     21 
     22 #include "test_macros.h"
     23 
     24 namespace fs = std::experimental::filesystem;
     25 
     26 int main() {
     27   using namespace fs;
     28   static_assert(std::is_copy_constructible<path>::value, "");
     29   static_assert(!std::is_nothrow_copy_constructible<path>::value, "should not be noexcept");
     30   const std::string s("foo");
     31   const path p(s);
     32   path p2(p);
     33   assert(p.native() == s);
     34   assert(p2.native() == s);
     35 }
     36