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