From db6edcd473a684420e9a7611b24462df21165c1b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 24 Apr 2022 17:13:52 +0200 Subject: style: improve function and brace styling --- src/DI/compressed_pair.hpp | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'src/DI/compressed_pair.hpp') diff --git a/src/DI/compressed_pair.hpp b/src/DI/compressed_pair.hpp index 6e05e29..b8646db 100644 --- a/src/DI/compressed_pair.hpp +++ b/src/DI/compressed_pair.hpp @@ -33,8 +33,8 @@ struct IntegerSequence template using MakeIndices = - typename __make_integer_seq::template ToTupleIndices; + typename __make_integer_seq:: + template ToTupleIndices; template requires(SizeTwo <= SizeOne) struct MakeTupleIndices @@ -64,9 +64,11 @@ struct CompressedPairElement } template - constexpr CompressedPairElement(std::piecewise_construct_t /*unused*/, - std::tuple args, - TupleIndices /*unused*/) + constexpr CompressedPairElement( + std::piecewise_construct_t /*unused*/, + std::tuple args, + TupleIndices /*unused*/ + ) : _value(std::forward(std::get(args))...) { } @@ -107,9 +109,11 @@ struct CompressedPairElement : private Value } template - constexpr CompressedPairElement(std::piecewise_construct_t /*unused*/, - std::tuple args, - TupleIndices /*unused*/) + constexpr CompressedPairElement( + std::piecewise_construct_t /*unused*/, + std::tuple args, + TupleIndices /*unused*/ + ) : Value(std::forward(std::get(args))...) { } @@ -146,13 +150,21 @@ public: } template - constexpr CompressedPair(std::piecewise_construct_t piecewise_construct, - std::tuple first_args, - std::tuple second_args) - : BaseOne(piecewise_construct, std::move(first_args), - typename MakeTupleIndices::type()), - BaseTwo(piecewise_construct, std::move(second_args), - typename MakeTupleIndices::type()) + constexpr CompressedPair( + std::piecewise_construct_t piecewise_construct, + std::tuple first_args, + std::tuple second_args + ) + : BaseOne( + piecewise_construct, + std::move(first_args), + typename MakeTupleIndices::type() + ), + BaseTwo( + piecewise_construct, + std::move(second_args), + typename MakeTupleIndices::type() + ) { } -- cgit v1.2.3-18-g5258