Skip to content

Commit

Permalink
rename best::seal
Browse files Browse the repository at this point in the history
  • Loading branch information
mcy committed Jul 10, 2024
1 parent 4d136f5 commit 7bbef75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions best/meta/internal/reflect.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ class tdesc final {

struct reify {
template <typename T>
static constexpr mirror<best::seal<tdesc<T, row<>, row<>>>,
best::seal<best::row<>>>
static constexpr mirror<best::abridge<tdesc<T, row<>, row<>>>,
best::abridge<best::row<>>>
empty{{{}, {}, {}}, {}};

template <typename T>
Expand Down
6 changes: 3 additions & 3 deletions best/meta/reflect.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ constexpr auto fields(best::is_reflected_struct auto&& value) {
template <typename Info_, typename With_>
class mirror final {
private:
using info_t = best::unseal<Info_>;
using with_t = best::unseal<With_>;
using info_t = best::unabridge<Info_>;
using with_t = best::unabridge<With_>;

public:
/// # `mirror::reflected`
Expand Down Expand Up @@ -155,7 +155,7 @@ class mirror final {
with_t with_;
};
template <typename... Ts>
mirror(Ts...) -> mirror<best::seal<Ts>...>;
mirror(Ts...) -> mirror<best::abridge<Ts>...>;

/// # `best::reflected_field`
///
Expand Down
10 changes: 5 additions & 5 deletions best/meta/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ using select = traits_internal::select<cond, A, B>::type;
template <bool cond, best::type_trait A, best::type_trait B>
using select_trait = traits_internal::select<cond, A, B>::type::type;

/// # `best::seal<T>`, `best::unseal<T>`
/// # `best::abridge<T>`, `best::unabridge<T>`
///
/// Seals a type.
/// Abridges a type name.
///
/// This produces a new type with a very small opaque name that can be
/// `best::unseal`ed to produce the original type.
/// `best::unabridge`ed to produce the original type.
template <typename T>
using seal = decltype(best::traits_internal::seal<best::id<T>>);
using abridge = decltype(best::traits_internal::seal<best::id<T>>);
template <typename Sealed>
using unseal = best::traits_internal::unseal<Sealed>::type;
using unabridge = best::traits_internal::unseal<Sealed>::type;
} // namespace best

#endif // BEST_META_TRAITS_H_

0 comments on commit 7bbef75

Please sign in to comment.