|
-
August 3rd, 2008, 08:33 PM
#8
Re: Initializing an array data member?
Hi guys,
This really made me appreciate std::string!
However,
I did some studying of my own and I came to a conclusion at this point that it is not possible to initialize an array in the initializer list and I'd like to confirm this finding (or correct) by those who know better.
My understanding is this -
When an element initializer is used, its copy constructor is called,
I'm not sure if this applies to an array but it certainly applies to sequential containers.
if this too applies to the array, and we know that there is no array copy or assignment,
hence, the initialization would fail for the array.
can anyone tell me more in details if this is true or not?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|