checked_iterator.h File Reference

Checked iterator factory function. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename PTR>
PTR ACE_make_checked_array_iterator (PTR buf, size_t)


Detailed Description

Checked iterator factory function.

Some compilers (e.g. MSVC++ >= 8) issue security related diagnostics if algorithms such as std::copy() are used in an unsafe way. Normally this isn't an issue if STL container iterators are used in conjuction with the standard algorithms. However, in cases where application-specific iterators are use with standard algorithms that could potentially overrun a buffer, extra care must be taken to prevent such an overrun. If supported, checked iterators can be used to address the potential destination buffer overrun.

This header provides function templates that generate the appropriate checked iterator. In cases where checked iterators are not supported, the pointer passed to the function is returned instead.

Id
checked_iterator.h 80826 2008-03-04 14:51:23Z wotte

For internal use only.

The functions and types in this header are meant for internal use. They may change at any point between releases.

Author:
Ossama Othman

Definition in file checked_iterator.h.


Function Documentation

template<typename PTR>
PTR ACE_make_checked_array_iterator ( PTR  buf,
size_t   
)

Definition at line 50 of file checked_iterator.h.

Referenced by ACE_Array_Map< Key, Value, EqualTo >::ACE_Array_Map(), and operator==().

00051 {
00052   // Checked iterators are unsupported.  Just return the pointer to
00053   // the buffer itself.
00054   return buf;
00055 }


Generated on Tue Feb 2 17:21:01 2010 for ACE by  doxygen 1.4.7