Note: This tutorial assumes that you have completed the previous tutorials: Arrays. |
![]() |
Stencils
Description: Windows onto ecl arrays.Keywords: ecl arrays
Tutorial Level: INTERMEDIATE
Next Tutorial: Buffer Overflow Detection
Often you require a window onto a container (array) and stencils provide a safe way to do this. Stencils avoid the use of dangerous pointers which can cause problems if the underlying container goes out of scope or is resized. It does this by including the underlying container as a reference and also includes similar out of range checks that arrays perform (exception throwing in debug mode for [] and always for at()).