default.pass.cpp (830B)
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 // <filesystem> 13 14 // class directory_entry 15 16 // directory_entry() noexcept = default; 17 18 #include "filesystem_include.hpp" 19 #include <type_traits> 20 #include <cassert> 21 22 int main() { 23 using namespace fs; 24 // Default 25 { 26 static_assert(std::is_nothrow_default_constructible<directory_entry>::value, 27 "directory_entry must have a nothrow default constructor"); 28 directory_entry e; 29 assert(e.path() == path()); 30 } 31 }