Skip to content

Commit 691a913

Browse files
refactor: Explicitly disable the underlying traits of primitives
1 parent 7dbf90a commit 691a913

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/primitive/impl.cppm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,20 @@ using F80 = primitive<long double, Policies...>;
272272
} // namespace types
273273

274274
} // namespace mcpplibs::primitives
275+
276+
export template <mcpplibs::primitives::underlying_type T, mcpplibs::primitives::policy::policy_type... Policies>
277+
struct mcpplibs::primitives::underlying::traits<mcpplibs::primitives::primitive<T, Policies...>>
278+
{
279+
using value_type = void;
280+
using rep_type = void;
281+
282+
static constexpr bool enabled = false;
283+
284+
static constexpr auto kind = static_cast<category>(-1);
285+
286+
template <typename U> static constexpr rep_type to_rep(U) noexcept = delete;
287+
288+
template <typename U> static constexpr value_type from_rep(U) noexcept = delete;
289+
290+
template <typename U> static constexpr bool is_valid_rep(U) noexcept = delete;
291+
};

0 commit comments

Comments
 (0)