LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
path.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_PATH_H
16#define LIEF_PATH_H
17#include <type_traits>
18#include <filesystem>
19
20namespace LIEF {
21
23template<class T>
24inline constexpr bool is_path_v =
25 std::is_same_v<std::decay_t<T>, std::filesystem::path>;
26
30template<class... Ts>
31using enable_if_path_t = std::enable_if_t<(is_path_v<Ts> || ...), int>;
32
33}
34
35#endif
LIEF namespace.
Definition Abstract/Binary.hpp:41
constexpr bool is_path_v
Whether T is a std::filesystem::path.
Definition path.hpp:24
std::enable_if_t<(is_path_v< Ts >||...), int > enable_if_path_t
Helper used by the functions that expose both a std::string_view and a std::filesystem::path overload...
Definition path.hpp:31