Topic: Undocumented mutex_type


Author: viboes <vicente.botet@wanadoo.fr>
Date: Sun, 19 Sep 2010 16:53:36 CST
Raw View
On Sep 15, 10:22=A0pm, Howard Hinnant <howard.hinn...@gmail.com> wrote:
> On Sep 14, 1:49=A0pm, viboes <vicente.bo...@wanadoo.fr> wrote:
>
> > If n3130 is accepted, as we use lockable instead of mutex, shouldn't
> > this nested type be named lockable_type?
>
> That sounds like a good renaming to me. =A0Perhaps you could submit an
> LWG issue to make this happen.

Done.

Vicente

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: viboes <vicente.botet@wanadoo.fr>
Date: Sun, 19 Sep 2010 16:58:53 CST
Raw View
On Sep 15, 8:14=A0pm, Daniel Kr=FCgler <daniel.krueg...@googlemail.com>
wrote:
> On 14 Sep., 22:49, viboes <vicente.bo...@wanadoo.fr> wrote:
>
> > In 30.4.3.1 and 30.4.3.2
>
> > there is a nested typedef mutex_type, which is not documented. Is
> > this
> > typedef used only for exposition only and we need to change the
> > declaration to
>
> > =A0 =A0typedef Mutex mutex_type; // Exposition only
>
> > or the typedef is undocumented and we need to add a paragraph after 1.
>
> Not everything in the standard must be specified in terms of a
> separate
> paragraph, e.g. neither the typedef first_type nor the typedef
> second_type
> from std::pair are explicitly documented. The definition "by code" is
> clear enough. Especially full-defined typedefs are usually not further
> specified. In other words: The typedef is implicitly defined and
> documented.

Sorry. I was not aware of this implicit documentation.

Thanks,
Vicente

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: viboes <vicente.botet@wanadoo.fr>
Date: Tue, 14 Sep 2010 14:49:16 CST
Raw View
In 30.4.3.1 and 30.4.3.2

there is a nested typedef mutex_type, which is not documented. Is
this
typedef used only for exposition only and we need to change the
declaration to

   typedef Mutex mutex_type; // Exposition only

or the typedef is undocumented and we need to add a paragraph after 1.

If n3130 is accepted, as we use lockable instead of mutex, shouldn't
this nested type be named lockable_type?

--
Vicente

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Wed, 15 Sep 2010 12:14:33 CST
Raw View
On 14 Sep., 22:49, viboes <vicente.bo...@wanadoo.fr> wrote:
> In 30.4.3.1 and 30.4.3.2
>
> there is a nested typedef mutex_type, which is not documented. Is
> this
> typedef used only for exposition only and we need to change the
> declaration to
>
> =A0 =A0typedef Mutex mutex_type; // Exposition only
>
> or the typedef is undocumented and we need to add a paragraph after 1.

Not everything in the standard must be specified in terms of a
separate
paragraph, e.g. neither the typedef first_type nor the typedef
second_type
from std::pair are explicitly documented. The definition "by code" is
clear enough. Especially full-defined typedefs are usually not further
specified. In other words: The typedef is implicitly defined and
documented.

> If n3130 is accepted, as we use lockable instead of mutex, shouldn't
> this nested type be named lockable_type?

Looks like a good idea to me.

HTH & Greetings from Bremen,

Daniel Kr=FCgler

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Howard Hinnant <howard.hinnant@gmail.com>
Date: Wed, 15 Sep 2010 14:22:58 CST
Raw View
On Sep 14, 1:49=A0pm, viboes <vicente.bo...@wanadoo.fr> wrote:
> In 30.4.3.1 and 30.4.3.2
>
> there is a nested typedef mutex_type, which is not documented. Is
> this
> typedef used only for exposition only and we need to change the
> declaration to
>
> =A0 =A0typedef Mutex mutex_type; // Exposition only
>
> or the typedef is undocumented and we need to add a paragraph after 1.

The specification seems clear to me that mutex_type is documented/
specified as the template parameter used to instantiate lock_guard/
unique_lock.

> If n3130 is accepted, as we use lockable instead of mutex, shouldn't
> this nested type be named lockable_type?

That sounds like a good renaming to me.  Perhaps you could submit an
LWG issue to make this happen.

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#submit_issue

-Howard

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]