4 ms·
Oh... so the new type, foo, is distinct (not assignment-compatible) from std::vector<int>?
by naruhodo 3y ago
Oh... so the new type, foo, is distinct (not assignment-compatible) from std::vector<int>?
- Someone 3y agoYes, but functionally identical. See for example Haskell type vs new type: https://typeclasses.com/coerce https://typeclasses.com/coerce Python NewType: https://docs.python.org/3/library/typing.html#newtype https://docs.python.org/3/library/typing.html#newtype