Topic: UDL's in the C++0x library
Author: Sean Hunt <rideau3@gmail.com>
Date: Fri, 20 Nov 2009 15:36:16 CST Raw View
On Nov 19, 12:59 pm, Greg Herlihy <gre...@mac.com> wrote:
> As far as I can tell, the functions needed to create UDLs for Standard
> Library types could be defined in the global namespace - or, in any
> namespace that would be searched when resolving an unqualified name.
>
> Greg
They could, however, all UDL names not starting with an underscore are
"reserved for future standardization", whatever that means.
Sean
--
[ 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: Sean Hunt <rideau3@gmail.com>
Date: Wed, 18 Nov 2009 12:32:06 CST Raw View
Currently, the draft C++0x library has no user-defined literals. It
seems wasteful to include them as a language feature but not include
the ability to use them for standard types. There are only two types I
really feel need UDLs - complex<T> (a suffix 'i' for imaginary values)
and basic_string (a suffix 's'), and defining UDLs for them would be 7
functions that would occupy a reserved name space (sic).
I think that these literals would be a useful addition to the library,
and ought to be considered for C++0x for the ease of use they provide.
If there are any reasons they should not be standardized, they likely
indicate flaws in the UDL proposal that should be resolved before a
committee-designed feature is shipped.
Sean Hunt
--
[ 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: Greg Herlihy <greghe@mac.com>
Date: Thu, 19 Nov 2009 13:59:50 CST Raw View
On Nov 18, 1:32 pm, Sean Hunt <ride...@gmail.com> wrote:
> Currently, the draft C++0x library has no user-defined literals. It
> seems wasteful to include them as a language feature but not include
> the ability to use them for standard types. There are only two types I
> really feel need UDLs - complex<T> (a suffix 'i' for imaginary values)
> and basic_string (a suffix 's'), and defining UDLs for them would be 7
> functions that would occupy a reserved name space (sic).
As far as I can tell, the functions needed to create UDLs for Standard
Library types could be defined in the global namespace - or, in any
namespace that would be searched when resolving an unqualified name.
Greg
--
[ 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 ]