mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 03:02:28 +00:00
Release Cosmopolitan v3.6.0
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
This commit is contained in:
parent
62ace3623a
commit
5660ec4741
1585 changed files with 117353 additions and 271644 deletions
47
third_party/libcxx/__filesystem/file_status.h
vendored
47
third_party/libcxx/__filesystem/file_status.h
vendored
|
@ -10,7 +10,6 @@
|
|||
#ifndef _LIBCPP___FILESYSTEM_FILE_STATUS_H
|
||||
#define _LIBCPP___FILESYSTEM_FILE_STATUS_H
|
||||
|
||||
#include <__availability>
|
||||
#include <__config>
|
||||
#include <__filesystem/file_type.h>
|
||||
#include <__filesystem/perms.h>
|
||||
|
@ -19,54 +18,50 @@
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
#if _LIBCPP_STD_VER >= 17
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
|
||||
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
|
||||
|
||||
class _LIBCPP_TYPE_VIS file_status {
|
||||
class _LIBCPP_EXPORTED_FROM_ABI file_status {
|
||||
public:
|
||||
// constructors
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
file_status() noexcept : file_status(file_type::none) {}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept
|
||||
: __ft_(__ft),
|
||||
__prms_(__prms) {}
|
||||
_LIBCPP_HIDE_FROM_ABI file_status() noexcept : file_status(file_type::none) {}
|
||||
_LIBCPP_HIDE_FROM_ABI explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept
|
||||
: __ft_(__ft), __prms_(__prms) {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI file_status(const file_status&) noexcept = default;
|
||||
_LIBCPP_HIDE_FROM_ABI file_status(file_status&&) noexcept = default;
|
||||
_LIBCPP_HIDE_FROM_ABI file_status(file_status&&) noexcept = default;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
~file_status() {}
|
||||
_LIBCPP_HIDE_FROM_ABI ~file_status() {}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI file_status& operator=(const file_status&) noexcept = default;
|
||||
_LIBCPP_HIDE_FROM_ABI file_status& operator=(file_status&&) noexcept = default;
|
||||
_LIBCPP_HIDE_FROM_ABI file_status& operator=(file_status&&) noexcept = default;
|
||||
|
||||
// observers
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
file_type type() const noexcept { return __ft_; }
|
||||
_LIBCPP_HIDE_FROM_ABI file_type type() const noexcept { return __ft_; }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
perms permissions() const noexcept { return __prms_; }
|
||||
_LIBCPP_HIDE_FROM_ABI perms permissions() const noexcept { return __prms_; }
|
||||
|
||||
// modifiers
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void type(file_type __ft) noexcept { __ft_ = __ft; }
|
||||
_LIBCPP_HIDE_FROM_ABI void type(file_type __ft) noexcept { __ft_ = __ft; }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void permissions(perms __p) noexcept { __prms_ = __p; }
|
||||
_LIBCPP_HIDE_FROM_ABI void permissions(perms __p) noexcept { __prms_ = __p; }
|
||||
|
||||
# if _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI friend bool operator==(const file_status& __lhs, const file_status& __rhs) noexcept {
|
||||
return __lhs.type() == __rhs.type() && __lhs.permissions() == __rhs.permissions();
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
private:
|
||||
file_type __ft_;
|
||||
perms __prms_;
|
||||
};
|
||||
|
||||
_LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||
|
||||
_LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
#endif // _LIBCPP_STD_VER >= 17
|
||||
|
||||
#endif // _LIBCPP___FILESYSTEM_FILE_STATUS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue