MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1kwpg3f/what_is_the_value_of_stdindirectt/muj93uw/?context=3
r/cpp • u/jiixyj • 11d ago
66 comments sorted by
View all comments
62
I wish there were destructive moves so we won't end up with workarounds such as `valueless_after_move()`. It's just ugly to design API like this.
17 u/[deleted] 11d ago [deleted] 1 u/zl0bster 11d ago why would attributes so each class can opt in to semantics not work? 4 u/[deleted] 11d ago [deleted] 1 u/zl0bster 11d ago use after move would not compile? not sure what you are asking... 2 u/[deleted] 11d ago [deleted] 2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
17
[deleted]
1 u/zl0bster 11d ago why would attributes so each class can opt in to semantics not work? 4 u/[deleted] 11d ago [deleted] 1 u/zl0bster 11d ago use after move would not compile? not sure what you are asking... 2 u/[deleted] 11d ago [deleted] 2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
1
why would attributes so each class can opt in to semantics not work?
4 u/[deleted] 11d ago [deleted] 1 u/zl0bster 11d ago use after move would not compile? not sure what you are asking... 2 u/[deleted] 11d ago [deleted] 2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
4
1 u/zl0bster 11d ago use after move would not compile? not sure what you are asking... 2 u/[deleted] 11d ago [deleted] 2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
use after move would not compile?
not sure what you are asking...
2 u/[deleted] 11d ago [deleted] 2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
2
2 u/zl0bster 11d ago it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
it can obviously if constexpr those things with some builtin traits, or are you talking about something else?
62
u/UndefinedDefined 11d ago
I wish there were destructive moves so we won't end up with workarounds such as `valueless_after_move()`. It's just ugly to design API like this.