brintos

brintos / llvm-project-archived public Read only

0
0
Text · 936 B · aca58f1 Raw
37 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// <filesystem>12 13// class path14 15// path(path const&)16 17#include <filesystem>18#include <cassert>19#include <string>20#include <type_traits>21 22#include "test_macros.h"23namespace fs = std::filesystem;24 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