diff options
author | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
commit | 182c8f8357739f905bbd721006480502435b6b43 (patch) | |
tree | 082613a474d863182e2ad8f2167f1643f26e67a3 /app/source/Cplt/Utils/Variant.hpp | |
parent | b01ed99a1cd0c863c8709930658513c04dd70f61 (diff) |
Update brace style to match rest of my projectscplt-imgui
Diffstat (limited to 'app/source/Cplt/Utils/Variant.hpp')
-rw-r--r-- | app/source/Cplt/Utils/Variant.hpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/source/Cplt/Utils/Variant.hpp b/app/source/Cplt/Utils/Variant.hpp index df2f882..b601811 100644 --- a/app/source/Cplt/Utils/Variant.hpp +++ b/app/source/Cplt/Utils/Variant.hpp @@ -4,21 +4,18 @@ #include <variant> template <class... Ts> -struct Overloaded : Ts... -{ +struct Overloaded : Ts... { using Ts::operator()...; }; template <class... Ts> Overloaded(Ts...) -> Overloaded<Ts...>; template <class... Args> -struct VariantCastProxy -{ +struct VariantCastProxy { std::variant<Args...> v; template <class... ToArgs> - operator std::variant<ToArgs...>() const - { + operator std::variant<ToArgs...>() const { return std::visit( [](auto&& arg) -> std::variant<ToArgs...> { return arg; }, v); @@ -27,7 +24,6 @@ struct VariantCastProxy /// Use snake_case naming to align with `static_cast`, `dynamic_cast`, etc.. template <class... Args> -auto variant_cast(std::variant<Args...> v) -> VariantCastProxy<Args...> -{ +auto variant_cast(std::variant<Args...> v) -> VariantCastProxy<Args...> { return { std::move(v) }; } |