Note: This tutorial assumes that you have completed the previous tutorials: Arrays. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
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()).