Topic: basic_regex: Missing locale postconditions?


Author: "=?iso-8859-1?q?Daniel_Kr=FCgler?=" <daniel.kruegler@googlemail.com>
Date: Fri, 23 Feb 2007 15:28:40 CST
Raw View
I would like to discuss some locale-related point of the
basic_regex class template described in N2134.

1) Although 28.8.5/1 implies the existence of a member
traits_inst of type traits in the basic_regex class, there
exists no such member declaration in the template definition
of 28.8/3. I would have expected something like the following
line after the swap member declaration:

private:
// traits traits_inst; exposition only

Shouldn't it exist, because a name for it is used in the
member descriptions, as seen in 28.8.5/1 and /2?
 (I see no need for a similar named declaration of the implied
locale member in the regex_traits class template, because
this one does not mention any named member to describe
its members)

2) None of the copying member descriptions of 28.8 say
something concerning the postconditions of this
traits_inst member, notably concerning its implied locale,
e.g. 28.8/11 says:

"Postconditions: flags() and mark_count() return e.flags()
and e.mark_count(), respectively."

Shouldn't there also exists the additional requirement that
getloc() == e.getloc()?
Similar reasoning applies to the postconditions of the
member assign described in 28.8.3/2.

I'm less sure whether there exists the need the explicitly
mention in which way the member traits_inst is initialized
in each c'tor, but I would like to add this missing point, too.

Greetings from Bremen,

Daniel Kr   gler


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