Skip to content

Instantly share code, notes, and snippets.

View athre0z's full-sized avatar

Joel Höner athre0z

View GitHub Profile
impl<V: Value> core::str::FromStr for NonNormalizingDec<V> {
type Err = &'static str;
#[inline(never)]
#[rustfmt::skip]
fn from_str(s: &str) -> Result<Self, Self::Err> {
/// Converts an ASCII decimal digit to an int.
///
/// In release builds, no range checks are performed and passing a
/// non-digit character will result is undefined (yet safe) behavior.
template<typename WrapperT, typename WrappedT>
struct Proxy {
virtual WrappedT& valueRef() = 0;
virtual const WrappedT& valueCRef() const = 0;
virtual ~Proxy() = default;
};
template<typename WrapperT, typename WrappedT>
struct Add {
template<typename RhsT>