Lines Matching refs:Dst

52   // A range checked destination type can be supplied using the Dst template
54 template <typename Dst = T>
57 IsValueInRangeForNumericType<Dst>(state_.value());
60 // AssignIfValid(Dst) - Assigns the underlying value if it is currently valid
63 template <typename Dst>
70 AssignIfValid(Dst* result) const {
71 return BASE_NUMERICS_LIKELY(IsValid<Dst>())
72 ? ((*result = static_cast<Dst>(state_.value())), true)
78 // A range checked destination type can be supplied using the Dst template
84 template <typename Dst = T, class CheckHandler = CheckOnFailure>
85 constexpr StrictNumeric<Dst> ValueOrDie() const {
86 return BASE_NUMERICS_LIKELY(IsValid<Dst>())
87 ? static_cast<Dst>(state_.value())
88 : CheckHandler::template HandleFailure<Dst>();
94 // A range checked destination type can be supplied using the Dst template
97 template <typename Dst = T, typename Src>
98 constexpr StrictNumeric<Dst> ValueOrDefault(const Src default_value) const {
99 return BASE_NUMERICS_LIKELY(IsValid<Dst>())
100 ? static_cast<Dst>(state_.value())
101 : checked_cast<Dst>(default_value);
107 template <typename Dst>
108 constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const {
291 template <typename Dst, typename Src>
293 return value.template IsValid<Dst>();
296 template <typename Dst, typename Src>
297 constexpr StrictNumeric<Dst> ValueOrDieForType(
299 return value.template ValueOrDie<Dst>();
302 template <typename Dst, typename Src, typename Default>
303 constexpr StrictNumeric<Dst> ValueOrDefaultForType(
306 return value.template ValueOrDefault<Dst>(default_value);