TooN 2.1
|
Check if a slice is OK. This class is used to see if a slice is OK. It provides a callable function which checks the run-time slice information. If the compile time information is bad, then it will not compile at all. Otherwise, the sizes are checked at run-time. The check will be optimized away if the sizes are known statically. More...
#include <slice_error.hh>
Classes | |
struct | N |
choose a number statically or dynamically. More... | |
Static Public Member Functions | |
static void | check () |
static void | check (int size, int start, int length) |
Check if a slice is OK. This class is used to see if a slice is OK. It provides a callable function which checks the run-time slice information. If the compile time information is bad, then it will not compile at all. Otherwise, the sizes are checked at run-time. The check will be optimized away if the sizes are known statically.
static void check | ( | ) | [static] |
Check the slice. This is full static checking, which is stricter than mixed chacking. For instance, none of the slice parameters. This should be used in addition to the other check function. are allowed to be -1 (Dynamic).
Referenced by CheckSlice< Size, Start, Length >::check().
static void check | ( | int | size, |
int | start, | ||
int | length | ||
) | [static] |
Check the slice. The policy is that static sized where present are used. However, for extra debugging one can test to see if the static and dynamic sizes are mismatched. any sense whatsoever.
size | Vector size |
start | Start position of the slice |
length | Length of the slice. |
References CheckSlice< Size, Start, Length >::check(), and TooN::Dynamic.