This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: New const char* ctor for C++-0x
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 22 Dec 2009 17:21:02 +0100
- Subject: Re: New const char* ctor for C++-0x
- References: <4B30EEAD.6020405@verizon.net>
On 12/22/2009 05:07 PM, Ed Smith-Rowland wrote:
> OK?
Not yet.
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Construct from a string.
+ * @param str A string of '0' and '1' characters.
+ * @throw std::invalid_argument If a character appears in the string
+ * which is neither '0' nor '1'.
+ */
+ explicit
+ bitset(const char* __str)
+ : _Base()
+ {
+ size_t __len = 0;
???
+ if (__str)
+ {
+ const size_t __len = __builtin_strlen(__str);
+ _M_copy_from_ptr<char,std::char_traits<char>>
Always a space after the comma.
Also, please try to simplify the testcase: I can't believe that in order
to test such a small feature we need <algorithm>, <cstring>, etc!
Paolo.