Your title here asks "What details does my question need?", but then you express confusion over the fact that the question was closed with the standard close reason "needs details or clarity".
The issue here is that the question needs clarity.
For example:
Why wouldn't regular const/non const overloads work, instead of having 4 different ones?
I think that "regular const/non const overloads" means 4 versions in total - because there are two separate things that each require a const and non-const variety.
If you meant, for example, "why do there need to be separate versions for ordinary references and move-references?", then you should say that, in about as many words. That way, it doesn't come across like a plain rant ("4 versions is too many to keep track of!") and points at the specific point of confusion. I guess this is what you were really getting at.
If you meant "what does the &&
mean?", then you should actually ask that - but I'm sure it's a duplicate. (I don't think you meant this, given the context. But it's important for completeness.)
If you meant "Why are there 4 overloads in total, considering these qualities?", then I don't know how there is a meaningful question underlying that. The best I could tell you is "because 2 × 2 = 4".
If you meant something else, I can't fathom it.
I mean, I guess I could have spelled out value() const &&..., but my question was not about specific member functions
You should do it anyway, because it's standard policy that information necessary to understand the question should be in the question itself. It takes barely any additional space to do this, and makes things easier for everyone else. Please remember at all times that questions (and answers) exist for everyone's reference. Hence, for example, my inclusion of the "what does the &&
mean?" possibility above.
It doesn't matter that the question isn't specific to std::expected.value
- if you're making an example of something, then we should immediately see the example. It's the same principle as how, for a question about something that goes wrong with code, we expect an MRE in the question. The fact that the MRE isn't your actual code, is irrelevant, and is absolutely not a reason to hide that MRE behind a link. (If you want to use someone else's MRE for some reason, then copy it, with attribution.)
but my question was not about specific member functions, and that would be for novices to understand what I'm talking about, not domain experts.
Are novices not entitled to understand the question, and possibly learn something from seeing it answered by experts?
Are experts somehow hindered by explicitly spelling out the example?
Clear communication benefits everyone. Questions and answers are for everyone.
Please seek to be as clear as possible in writing questions.
(Note that being plainly redundant does not generally improve clarity, but being explicit does.)
it's certainly not enough to warrant a closure right?
I think I actually agree with you. Nevertheless, please make sure you understand how closure works why it's used. Changes like these are important, and closure is in part a tool for advertising where they're needed. Unfortunately, we don't have a bounty system for question edits. And really, it would be better to make these changes yourself when possible, rather than taking up time and space on Meta.