File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,13 @@ String::String(StringSumHelper &&rval) {
5959 init ();
6060 move (rval);
6161}
62+
63+ String::String (std::initializer_list<char > list) {
64+ init ();
65+ if (list.size () > 0 ) {
66+ copy (list.begin (), list.size ());
67+ }
68+ }
6269#endif
6370
6471String::String (char c) {
Original file line number Diff line number Diff line change 2929#include < stdint.h>
3030#include < string.h>
3131#include < ctype.h>
32+ #include < initializer_list>
3233
3334// A pure abstract class forward used as a means to proide a unique pointer type
3435// but really is never defined.
@@ -58,6 +59,7 @@ class String {
5859 String (const char *cstr, unsigned int length);
5960#ifdef __GXX_EXPERIMENTAL_CXX0X__
6061 String (const uint8_t *cstr, unsigned int length) : String(reinterpret_cast <const char *>(cstr), length) {}
62+ String (std::initializer_list<char > list);
6163#endif
6264 String (const String &str);
6365 String (const __FlashStringHelper *str) : String(reinterpret_cast <const char *>(str)) {}
You can’t perform that action at this time.
0 commit comments