## Class permissions

boost::log::permissions — Access permissions wrapper.

## Synopsis

    // In header: <boost/log/utility/permissions.hpp>

    class permissions {
    public:
      // types
      typedef implementation_defined native_type;  // The type of security permissions, specific to the operating system.

      // public member functions
      permissions() noexcept;
      permissions(permissions const &) noexcept;
      permissions & operator=(permissions const &) noexcept;
      permissions(native_type) noexcept;
      permissions(boost::interprocess::permissions const &) noexcept;
      permissions(permissions &&) noexcept;
      permissions & operator=(permissions &&) noexcept;
      void set_native(native_type) noexcept;
      native_type get_native() const noexcept;
      void set_default() noexcept;
      void set_unrestricted();
      void swap(permissions &) noexcept;

      // friend functions
      void swap(permissions &, permissions &) noexcept;
    };

## Description

On Windows platforms, it represents a pointer to `SECURITY_ATTRIBUTES`. The user is responsible for allocating and reclaiming resources associated with the pointer, `permissions` instance does not own them.

On POSIX platforms, it represents a `mode_t` value.

### `permissions` public member functions

1.     permissions() noexcept;

   Default constructor. The method constructs an object that represents a null `SECURITY_ATTRIBUTES` pointer on Windows platforms, and a `mode_t` value `0644` on POSIX platforms.

2.     permissions(permissions const & that) noexcept;

   Copy constructor.

3.     permissions & operator=(permissions const & that) noexcept;

   Copy assignment.

4.     permissions(native_type perms) noexcept;

   Initializing constructor.

5.     permissions(boost::interprocess::permissions const & perms) noexcept;

   Initializing constructor.

6.     permissions(permissions && that) noexcept;

   Move constructor.

7.     permissions & operator=(permissions && that) noexcept;

   Move assignment.

8.     void set_native(native_type perms) noexcept;

   Sets permissions from the OS-specific permissions.

9.     native_type get_native() const noexcept;

   Returns the underlying OS-specific permissions.

10.     void set_default() noexcept;

    Sets the default permissions, which are equivalent to `NULL` `SECURITY_ATTRIBUTES` on Windows and `0644` on POSIX platforms.

11.     void set_unrestricted();

    Sets unrestricted permissions, which are equivalent to `SECURITY_ATTRIBUTES` with `NULL` DACL on Windows and `0666` on POSIX platforms.

12.     void swap(permissions & that) noexcept;

    The method swaps the object with that.

    Parameters: |
    `that` | The other object to swap with.

### `permissions` friend functions

1.     void swap(permissions & a, permissions & b) noexcept;

   Swaps the two `permissions` objects.