Path: blob/main/contrib/llvm-project/libcxx/include/__filesystem/perm_options.h
35262 views
// -*- C++ -*-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//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___FILESYSTEM_PERM_OPTIONS_H10#define _LIBCPP___FILESYSTEM_PERM_OPTIONS_H1112#include <__config>1314#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)15# pragma GCC system_header16#endif1718#if _LIBCPP_STD_VER >= 171920_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM2122enum class perm_options : unsigned char { replace = 1, add = 2, remove = 4, nofollow = 8 };2324_LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator&(perm_options __lhs, perm_options __rhs) {25return static_cast<perm_options>(static_cast<unsigned>(__lhs) & static_cast<unsigned>(__rhs));26}2728_LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator|(perm_options __lhs, perm_options __rhs) {29return static_cast<perm_options>(static_cast<unsigned>(__lhs) | static_cast<unsigned>(__rhs));30}3132_LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator^(perm_options __lhs, perm_options __rhs) {33return static_cast<perm_options>(static_cast<unsigned>(__lhs) ^ static_cast<unsigned>(__rhs));34}3536_LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator~(perm_options __lhs) {37return static_cast<perm_options>(~static_cast<unsigned>(__lhs));38}3940_LIBCPP_HIDE_FROM_ABI inline perm_options& operator&=(perm_options& __lhs, perm_options __rhs) {41return __lhs = __lhs & __rhs;42}4344_LIBCPP_HIDE_FROM_ABI inline perm_options& operator|=(perm_options& __lhs, perm_options __rhs) {45return __lhs = __lhs | __rhs;46}4748_LIBCPP_HIDE_FROM_ABI inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) {49return __lhs = __lhs ^ __rhs;50}5152_LIBCPP_END_NAMESPACE_FILESYSTEM5354#endif // _LIBCPP_STD_VER >= 175556#endif // _LIBCPP___FILESYSTEM_PERM_OPTIONS_H575859