You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite the fact that vector types are sizeless (unless you apply a type attribute (#176)), it's still useful to be able to abstract the types into something else, sharing the same limitations as the base vector type.
This would allow the addition of static data and utility functions which don't interfere with the sizeless property, and it would allow the type to be distinguished for function overloading (like Boost's strong typedef).
If it's really not possible to use a class, then I suppose an alternative would be the above 'strong typedef' concept as a type attribute; so it's at least possible to create the abstract type and then implement the utilities externally in template and function overloads.
I think in either case there's the problem of inheriting the ability to be passed to established intrinsic overloads without extra faff, while still being distinct types for new overloads.
This is not the first time I've had problems with attaching things to magic types. It's really a broader problem with the languages, but it would be nonsense to make a generic request for a language extension without reference to a specific problem case. So I'm starting here.
The text was updated successfully, but these errors were encountered:
Splitting out of my comment in #238.
Despite the fact that vector types are sizeless (unless you apply a type attribute (#176)), it's still useful to be able to abstract the types into something else, sharing the same limitations as the base vector type.
This would allow the addition of static data and utility functions which don't interfere with the sizeless property, and it would allow the type to be distinguished for function overloading (like Boost's strong typedef).
If it's really not possible to use a class, then I suppose an alternative would be the above 'strong typedef' concept as a type attribute; so it's at least possible to create the abstract type and then implement the utilities externally in template and function overloads.
I think in either case there's the problem of inheriting the ability to be passed to established intrinsic overloads without extra faff, while still being distinct types for new overloads.
This is not the first time I've had problems with attaching things to magic types. It's really a broader problem with the languages, but it would be nonsense to make a generic request for a language extension without reference to a specific problem case. So I'm starting here.
The text was updated successfully, but these errors were encountered: