Skip to content

Commit 371bb52

Browse files
style: Fmt code
1 parent 880cada commit 371bb52

1 file changed

Lines changed: 44 additions & 40 deletions

File tree

src/primitive/impl.cppm

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module;
2+
#include <cstddef>
23
#include <cstdint>
34
#include <tuple>
5+
#include <type_traits>
46

57
export module mcpplibs.primitives.primitive.impl;
68

@@ -57,7 +59,9 @@ public:
5759

5860
constexpr explicit primitive(value_type v) noexcept : value_(v) {}
5961
constexpr value_type &value() noexcept { return value_; }
60-
[[nodiscard]] constexpr value_type const &value() const noexcept { return value_; }
62+
[[nodiscard]] constexpr value_type const &value() const noexcept {
63+
return value_;
64+
}
6165
constexpr explicit operator value_type() const noexcept { return value_; }
6266

6367
[[nodiscard]] auto load() const noexcept -> value_type {
@@ -101,44 +105,44 @@ private:
101105
value_type value_;
102106
};
103107

104-
namespace types {
105-
template <policy::policy_type... Policies>
106-
using Bool = primitive<bool, Policies...>;
107-
108-
template <policy::policy_type... Policies>
109-
using UChar = primitive<unsigned char, Policies...>;
110-
template <policy::policy_type... Policies>
111-
using Char8 = primitive<char8_t, Policies...>;
112-
template <policy::policy_type... Policies>
113-
using Char16 = primitive<char16_t, Policies...>;
114-
template <policy::policy_type... Policies>
115-
using Char32 = primitive<char32_t, Policies...>;
116-
template <policy::policy_type... Policies>
117-
using WChar = primitive<wchar_t, Policies...>;
118-
119-
template <policy::policy_type... Policies>
120-
using U8 = primitive<std::uint8_t, Policies...>;
121-
template <policy::policy_type... Policies>
122-
using U16 = primitive<std::uint16_t, Policies...>;
123-
template <policy::policy_type... Policies>
124-
using U32 = primitive<std::uint32_t, Policies...>;
125-
template <policy::policy_type... Policies>
126-
using U64 = primitive<std::uint64_t, Policies...>;
127-
template <policy::policy_type... Policies>
128-
using I8 = primitive<std::int8_t, Policies...>;
129-
template <policy::policy_type... Policies>
130-
using I16 = primitive<std::int16_t, Policies...>;
131-
template <policy::policy_type... Policies>
132-
using I32 = primitive<std::int32_t, Policies...>;
133-
template <policy::policy_type... Policies>
134-
using I64 = primitive<std::int64_t, Policies...>;
135-
136-
template <policy::policy_type... Policies>
137-
using F32 = primitive<float, Policies...>;
138-
template <policy::policy_type... Policies>
139-
using F64 = primitive<double, Policies...>;
140-
template <policy::policy_type... Policies>
141-
using F80 = primitive<long double, Policies...>;
142-
}
108+
namespace types {
109+
template <policy::policy_type... Policies>
110+
using Bool = primitive<bool, Policies...>;
111+
112+
template <policy::policy_type... Policies>
113+
using UChar = primitive<unsigned char, Policies...>;
114+
template <policy::policy_type... Policies>
115+
using Char8 = primitive<char8_t, Policies...>;
116+
template <policy::policy_type... Policies>
117+
using Char16 = primitive<char16_t, Policies...>;
118+
template <policy::policy_type... Policies>
119+
using Char32 = primitive<char32_t, Policies...>;
120+
template <policy::policy_type... Policies>
121+
using WChar = primitive<wchar_t, Policies...>;
122+
123+
template <policy::policy_type... Policies>
124+
using U8 = primitive<std::uint8_t, Policies...>;
125+
template <policy::policy_type... Policies>
126+
using U16 = primitive<std::uint16_t, Policies...>;
127+
template <policy::policy_type... Policies>
128+
using U32 = primitive<std::uint32_t, Policies...>;
129+
template <policy::policy_type... Policies>
130+
using U64 = primitive<std::uint64_t, Policies...>;
131+
template <policy::policy_type... Policies>
132+
using I8 = primitive<std::int8_t, Policies...>;
133+
template <policy::policy_type... Policies>
134+
using I16 = primitive<std::int16_t, Policies...>;
135+
template <policy::policy_type... Policies>
136+
using I32 = primitive<std::int32_t, Policies...>;
137+
template <policy::policy_type... Policies>
138+
using I64 = primitive<std::int64_t, Policies...>;
139+
140+
template <policy::policy_type... Policies>
141+
using F32 = primitive<float, Policies...>;
142+
template <policy::policy_type... Policies>
143+
using F64 = primitive<double, Policies...>;
144+
template <policy::policy_type... Policies>
145+
using F80 = primitive<long double, Policies...>;
146+
} // namespace types
143147

144148
} // namespace mcpplibs::primitives

0 commit comments

Comments
 (0)