LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
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
21
namespace
LIEF
{
22
24
template
<
class
T>
25
inline
constexpr
bool
is_path_v
=
26
std::is_same_v<std::decay_t<T>, std::filesystem::path>;
27
31
template
<
class
... Ts>
32
using
enable_if_path_t
= std::enable_if_t<(
is_path_v<Ts>
|| ...),
int
>;
33
34
}
35
36
#endif
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:41
LIEF::is_path_v
constexpr bool is_path_v
Whether T is a std::filesystem::path.
Definition
path.hpp:25
LIEF::enable_if_path_t
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
Generated by
1.18.0