The function for creation iterators, which, in essence, are raw pointers, that has an interface compatible with Microsoft stdext::checked_array_iterator.
- Template Parameters
-
- Parameters
-
ptr | is a pointer to be adapted. |
cSize | is a size of data or buffer pointed to by ptr, in elements of the T type. The size is passed to the checked_array_iterator class by the function when the build is performed by an MSVC compiler with defined _SECURE_SCL macro. Otherwise, the parameter is ignored. |
iOffset | is an offset within the buffer pointed to by ptr, in elements of the T type. The iterator is associated with an element ptr [iOffset]. Similar to cSize , the offset is passed to the checked_array_iterator, if the compiler used is MSVC, or added to ptr to produce the returned pointer otherwise. |
- Returns
- Returns an object of the raw_pointer_iterator type. This type is defined as checked_array_iterator when this file is compiled with Microsoft Visual C++ so that no C4996 warning is generated.
Other compilers consider the returned value as a pointer which equals ptr
.