Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Accessing std::vector data through pointer to first element.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="James Kanze, post: 3492381"] That's strange. My copy of C99 says exactly the opposite: that "the values of any padding bits are unspecified". There is even a footnote which says that certain values of padding bits may result in a trapping representation. The result is that in C99, memset can be used to initialize arrays of character types, but is not guaranteed to do anything useful in any other cases. Of course, in C++, who cares? We have std::fill and std::fill_n which are guaranteed to work correctly, for all types (including those with user defined constructors and assignment operators). The changes in this text in C99 was meant to clarify what was intended (but not expressed clearly) in C90. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Accessing std::vector data through pointer to first element.
Top