std::filesystem::path::empty - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::filesystem::path::empty

From cppreference.com
< cpp‎ | filesystem‎ | path

bool empty() const; |  | (since C++17)

Checks if the path is empty.

### [edit] Parameters

(none)

### [edit] Return value

true if the path is empty, false otherwise.

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Notes

An empty path can be obtained by calling `clear` and by default-constructing a `path`. It can also be returned by a path decomposition function (such as `extension`) if the corresponding component is not present in the path.

An empty path is classified as a relative path.

### [edit] See also

(constructor) | constructs a `path` (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/path/empty&oldid=91577"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template