This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, Aug 25, 2012 at 7:37 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:If you templatize the pointers as forward iterators there is nothing preventing you from *calling* with pointers on C arrays. You then get the benefit that all containers can use this interface as well. Plus you have std::array which is a C array under th ehood.Yes, and this is already trivial to do with the operator() interface.But iterators don't have to imply non-sequential storage. Using iterators instead of pointers would allow you to store them in a std::deque, for example, or in a std::vector using std::back_insert_iterator.
The fill() interface is needed for performance, everything else is taken care by the operator() interface.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |