Topic: DR 325 and non-parenthesized comma in default argument expression
Author: llewelly.at@xmission.dot.com (llewelly)
Date: Sat, 1 May 2004 16:49:05 +0000 (UTC) Raw View
23.3.5/1 contains the following declaration:
template<class charT, class traits, class Allocator>
explicit bitset(
const basic_string<charT,traits,Allocator>& str,
typename basic_string<charT,traits,Allocator>::size_type pos = 0,
typename basic_string<charT,traits,Allocator>::size_type n =
basic_string<charT,traits,Allocator>::npos);
The declaration is repeated in 23.3.5.1/2
If the resolution to open DR 325
(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#325) is
accepted, the declaration will be ill-formed.
I think the proposed resolution to DR 325 should be expanded to
inlcude changing the declaration in 23.3.5/1 to:
template<class charT, class traits, class Allocator>
explicit bitset(
const basic_string<charT,traits,Allocator>& str,
typename basic_string<charT,traits,Allocator>::size_type pos = 0,
typename basic_string<charT,traits,Allocator>::size_type n =
(basic_string<charT,traits,Allocator>::npos));
^-added parentheses------------------------^
and likewise for the repeated declaration in 23.3.5.1/2 .
---
[ 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.jamesd.demon.co.uk/csc/faq.html ]