Files
libcxx/test/std/experimental/filesystem/class.path/path.member/path.assign/braced_init.pass.cpp
Eric Fiselier f2b48899a5 Fix filesystem::path assignment from {}
Adding `path::operator=(string_type&&)` made the expression `p = {}`
ambiguous. This path fixes that ambiguity by making the `string&&`
overload a template so it ranks lower during overload resolution.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 05:48:55 +00:00

33 lines
734 B
C++

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
// <experimental/filesystem>
// class path
// path& operator=(path const&);
#include <experimental/filesystem>
#include <type_traits>
#include <cassert>
#include "test_macros.h"
#include "count_new.hpp"
namespace fs = std::experimental::filesystem;
int main() {
using namespace fs;
path p("abc");
p = {};
assert(p.native() == "");
}