-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#pragma once | ||
|
||
#include <type_traits> | ||
|
||
namespace path_tracking_pid { | ||
namespace path_tracking_pid | ||
{ | ||
|
||
// Converts an enumeration to its underlying type. | ||
template<typename enum_type> | ||
template <typename enum_type> | ||
constexpr std::underlying_type_t<enum_type> to_underlying(enum_type value) noexcept | ||
{ | ||
return static_cast<std::underlying_type_t<enum_type>>(value); | ||
return static_cast<std::underlying_type_t<enum_type>>(value); | ||
} | ||
|
||
} // namespace path_tracking_pid | ||
} // namespace path_tracking_pid |