8#ifndef V8_BASE_STRONG_ALIAS_H_
9#define V8_BASE_STRONG_ALIAS_H_
73template <
typename TagType,
typename UnderlyingType>
89 constexpr const UnderlyingType&&
operator*() const&& {
94 constexpr const UnderlyingType&
value() const& {
return value_; }
95 constexpr UnderlyingType&&
value() && {
return std::move(
value_); }
96 constexpr const UnderlyingType&&
value() const&& {
return std::move(
value_); }
98 constexpr explicit operator const UnderlyingType&()
const& {
return value_; }
121 return std::hash<UnderlyingType>()(
id.value());
130template <
typename TagType,
typename UnderlyingType>
131 requires requires(std::ostream& stream,
const UnderlyingType&
value) {
136 return stream << alias.
value();
141template <
typename TagType,
typename UnderlyingType>
142struct std::hash<
v8::base::StrongAlias<TagType, UnderlyingType>> {
145 return std::hash<UnderlyingType>()(
id.value());
constexpr UnderlyingType & operator*() &
constexpr const UnderlyingType & operator*() const &
friend bool operator==(const StrongAlias &lhs, const StrongAlias &rhs)=default
friend auto operator<=>(const StrongAlias &lhs, const StrongAlias &rhs)=default
constexpr StrongAlias(UnderlyingType &&v) noexcept
constexpr const UnderlyingType && value() const &&
constexpr const UnderlyingType * operator->() const
constexpr StrongAlias(const UnderlyingType &v)
constexpr const UnderlyingType && operator*() const &&
UnderlyingType underlying_type
constexpr UnderlyingType && value() &&
constexpr UnderlyingType & value() &
constexpr const UnderlyingType & value() const &
constexpr UnderlyingType * operator->()
constexpr UnderlyingType && operator*() &&
std::ostream & operator<<(std::ostream &out, AddressRegion region)
size_t operator()(const v8::base::StrongAlias< TagType, UnderlyingType > &id) const
result_type operator()(const argument_type &id) const
std::unique_ptr< ValueMirror > value