-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs, page numbers on status bar
- Loading branch information
1 parent
72ea17e
commit 6e71d71
Showing
9 changed files
with
160 additions
and
28 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
#include "concepts.hpp" | ||
|
||
namespace pdfv | ||
{ | ||
template<concepts::enum_concept Enum> | ||
struct Enumhelper_enabler; | ||
|
||
template<concepts::enum_concept Enum> | ||
using UnderT = std::underlying_type_t<Enum>; | ||
|
||
template<concepts::enum_concept Enum> | ||
[[nodiscard]] constexpr Enum operator|(Enum lhs, Enum rhs) noexcept requires std::is_constructible_v<Enumhelper_enabler<Enum>> | ||
{ | ||
return Enum{ UnderT<Enum>(lhs) | UnderT<Enum>(rhs) }; | ||
} | ||
template<concepts::enum_concept Enum> | ||
[[nodiscard]] constexpr Enum operator&(Enum lhs, Enum rhs) noexcept requires std::is_constructible_v<Enumhelper_enabler<Enum>> | ||
{ | ||
return Enum{ UnderT<Enum>(lhs) & UnderT<Enum>(rhs) }; | ||
} | ||
template<concepts::enum_concept Enum> | ||
[[nodiscard]] constexpr Enum operator^(Enum lhs, Enum rhs) noexcept requires std::is_constructible_v<Enumhelper_enabler<Enum>> | ||
{ | ||
return Enum{ UnderT<Enum>(lhs) ^ UnderT<Enum>(rhs) }; | ||
} | ||
|
||
template<concepts::enum_concept Enum> | ||
[[nodiscard]] constexpr bool operator!(Enum lhs) noexcept requires std::is_constructible_v<Enumhelper_enabler<Enum>> | ||
{ | ||
return !UnderT<Enum>(lhs); | ||
} | ||
template<concepts::enum_concept Enum> | ||
[[nodiscard]] constexpr Enum operator~(Enum lhs) noexcept requires std::is_constructible_v<Enumhelper_enabler<Enum>> | ||
{ | ||
return Enum{ ~UnderT<Enum>(lhs) }; | ||
} | ||
} |
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
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
Oops, something went wrong.