diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-08-26 23:31:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 23:31:45 +0200 |
commit | cd30e0b86ce6ee88386a91cebdf353fc55805c57 (patch) | |
tree | 1453f0e4dcbe2f2197913e916ab3e99116a29080 /src/common/Utilities/Util.h | |
parent | 7cc027401e4a2837872db54c835a4ed1a98e4a03 (diff) |
Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR #25335)
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index cd8765b309f..c22584d970d 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -20,6 +20,7 @@ #include "Define.h" #include "Errors.h" +#include "Optional.h" #include <array> #include <string> @@ -345,8 +346,6 @@ inline std::vector<uint8> HexStrToByteVector(std::string_view str, bool reverse return buf; } -TC_COMMON_API bool StringToBool(std::string_view str); - TC_COMMON_API bool StringEqualI(std::string_view str1, std::string_view str2); TC_COMMON_API bool StringStartsWith(std::string_view haystack, std::string_view needle); TC_COMMON_API bool StringContainsStringI(std::string_view haystack, std::string_view needle); @@ -560,4 +559,13 @@ Ret* Coalesce(T1* first, T*... rest) return static_cast<Ret*>(first); } +namespace Trinity +{ + template <typename T> + struct dependant_false { static constexpr bool value = false; }; + + template <typename T> + constexpr bool dependant_false_v = dependant_false<T>::value; +} + #endif |