Can the ordering of std::type_index be relied on to be stable over
I know that std::type_info
does not guarantee such thing?
Does std::type_index
?
Should one rather use std::type_info::name()
for the ordering?
type_info
's comparison operators are based on type_index::before
's behavior. And the standard specifically states that before
provides no guarantees outside of the execution of a single program:
The names, encoding rule, and collating sequence for types are all unspecified and may differ between programs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With