cplusplus / draft

C++ standards drafts
http://www.open-std.org/jtc1/sc22/wg21/
5.64k stars 742 forks source link

[thread.mutex] Mutex types defined in requirements #362

Open K-ballo opened 10 years ago

K-ballo commented 10 years ago

The mutex types are defined together with their requirements, under the "Mutex Requirements" [thread.mutex.requirements] section. This feels a bit odd.

I was expecting only the requirements to be defined under "Mutex Requirements", and the actual classes to be defined in their own sections, at the same level of requirements. See for example how the [containers] clause is specified.

jensmaurer commented 6 years ago

We could certainly move the subclauses containing the class definitions directly under [thread.mutex]. I'm not sure it would be a net improvement.

zygoloid commented 6 years ago

It seems like we have mixed together two things here: a set of requirements on mutex types, and a description of some concrete types that satisfy those requirements. We should describe the requirements abstractly, and then say that the standard library mutex types meet them, as we do with containers etc.

This is a large reorganization, and I'd like to request that LWG find someone to pursue it rather than us doing it editorially.

jwakely commented 6 years ago

I'll write a P-paper proposing that reorg.

jwakely commented 6 years ago

Unassigning myself, as I don't plan to work on this now.