Releases: outfox/newtype
Releases · outfox/newtype
0.5.1
FEAT:
Implicit Conversion From Inner (wrapping) and to inner (unwrapping) and Constructor Forwarding Options parameter added.
[newtype<int>(Options = NewtypeOptions.NoImplicitWrap)]
public readonly partial struct StrictEntityId;Options are:
internal enum NewtypeOptions
{
/// <summary>All features enabled (default).</summary>
None = 0,
/// <summary>Suppress the implicit conversion from T to the alias.</summary>
NoImplicitWrap = 1,
/// <summary>Suppress the implicit conversion from the alias to T.</summary>
NoImplicitUnwrap = 2,
/// <summary>Suppress forwarding constructors from T.</summary>
NoConstructorForwarding = 4,
/// <summary>Suppress both implicit conversions.</summary>
NoImplicitConversions = NoImplicitWrap | NoImplicitUnwrap,
/// <summary>Suppress implicit conversions and constructor forwarding.</summary>
Opaque = NoImplicitConversions | NoConstructorForwarding,
}FEAT: MethodImplOptions can be overridden. They default to AggressiveInlining but in some scenarios, PGO can get you better results if left alone. For very lightweight types, there is no discernible difference.
[newtype<int>(MethodImpl = default)]
public readonly partial struct RelaxedEntityId;Full Changelog: 0.4.0...0.5.0
0.4.0
Features:
- .NET 8.0 support
- .NET 9.0 support
- (.NET 10 was already supported)
Full Changelog: 0.3.0...0.4.0