32 template<
bool StaticBad>
55 template<
int Size,
int Start,
int Length>
61 template<
int Num>
struct N 65 return (Num==Dynamic||Num==Resizable)?num:Num;
93 static void check(
int size,
int start,
int length)
107 #ifndef TOON_NDEBUG_MISMATCH 108 if(Start != Dynamic && Size != Resizable && Start != start)
110 std::cerr <<
"TooN slice: mismatch between static and dynamic start.\n";
113 if(Length != Dynamic && Size != Resizable && Length != length)
115 std::cerr <<
"TooN slice: mismatch between static and dynamic length.\n";
118 if(Size != Dynamic && Size != Resizable && Size != size)
120 std::cerr <<
"TooN slice: mismatch between static and dynamic size.\n";
128 #ifdef TOON_TEST_INTERNALS 129 throw Internal::SliceError();
130 #elif !defined TOON_NDEBUG_SLICE 131 std::cerr <<
"TooN slice out of range" << std::endl;
138 #ifdef TOON_TEST_INTERNALS 139 template<
bool StaticBad>
142 throw Internal::StaticSliceError();
Definition: slice_error.hh:56
Pretty generic SFINAE introspection generator.
Definition: vec_test.cc:21
Definition: slice_error.hh:61
Definition: slice_error.hh:33
static void check()
This function does nothing: it merely exists.
Definition: slice_error.hh:44