| | |
gcc 4.4 In-class member initializers (c++0x)
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Feb 2008
Posts: 638
Reputation:
Solved Threads: 46
i.e.
I saw a mailing list post from October 08 where a guy asked if this was going to be added. gcc 4.4 was released April 09, so I would assume it would have been added by then? I haven't tried the svn version, but can anyone comment about if this works for them yet?
Thanks,
Dave
C++ Syntax (Toggle Plain Text)
class A { int x = 5; };
I saw a mailing list post from October 08 where a guy asked if this was going to be added. gcc 4.4 was released April 09, so I would assume it would have been added by then? I haven't tried the svn version, but can anyone comment about if this works for them yet?
Thanks,
Dave
•
•
Join Date: Feb 2008
Posts: 638
Reputation:
Solved Threads: 46
It's part of the new "c++0x standard" called "delegated constructors".
http://www.open-std.org/jtc1/sc22/wg...2006/n1986.pdf
http://www.open-std.org/jtc1/sc22/wg...2006/n1986.pdf
•
•
•
•
It's part of the new "c++0x standard" called "delegated constructors".
http://www.open-std.org/jtc1/sc22/wg...2006/n1986.pdf
int x = 5; would be a legal construct. As far as I can tell that document is talking about class constructors, not variable initialization outside the constructor. •
•
Join Date: Feb 2008
Posts: 638
Reputation:
Solved Threads: 46
Haha sorry, I totally flaked on that post - I've been looking at both of these feature and I posted the wrong one! I can't find an actual paper on this one, but here is what I saw:
http://www.research.att.com/~bs/C++0...ml#member-init
On an unrelated note: is there some minimum amount of time that has to pass before thread subscription will "instantly notify" me? For example (and this happens a lot) I posted a question, you answered and I received an email about this answer. Then I replied. Then you replied, and I didn't receive an email - am I misinterpreting the expected behavior?
Thanks,
Dave
http://www.research.att.com/~bs/C++0...ml#member-init
On an unrelated note: is there some minimum amount of time that has to pass before thread subscription will "instantly notify" me? For example (and this happens a lot) I posted a question, you answered and I received an email about this answer. Then I replied. Then you replied, and I didn't receive an email - am I misinterpreting the expected behavior?
Thanks,
Dave
•
•
•
•
On an unrelated note: is there some minimum amount of time that has to pass before thread subscription will "instantly notify" me? For example (and this happens a lot) I posted a question, you answered and I received an email about this answer. Then I replied. Then you replied, and I didn't receive an email - am I misinterpreting the expected behavior?
Thanks,
Dave
![]() |
Similar Threads
- Problem accessing base class member function whilst iterating through STL list (C++)
- Is It significant to define a member function as static in singleton class (C++)
- How do I declare a class member function in another class? (Python)
- calling oo class member function from c (C)
- String class (C++)
- callbacks and class member functions... (C++)
- Visual Studio 6: Initializing static class member (C++)
Other Threads in the C++ Forum
- Previous Thread: Snagged yet again...
- Next Thread: I need help with the errors I developed with C++
Views: 286 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays assignment beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data database delete desktop directshow display dll encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream input int integer java lazy lib linux loop looping loops map math matrix memory multidimensional newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






