MCPcopy Create free account
hub / github.com/dcleblanc/SafeInt / TestTopEqualSafeInt

Function TestTopEqualSafeInt

Archive/releases/4/TestCompile.cpp:220–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218
219template <typename T, typename U>
220void TestTopEqualSafeInt()
221{
222 T t(0);
223 SafeInt<U> su(1);
224 t += su;
225 t -= su;
226 t *= su;
227 t /= su;
228 t %= su;
229 t &= su;
230 t ^= su;
231 t |= su;
232 t <<= su;
233 t >>= su;
234
235 // Catch the pointer overrides here
236 char buf[5];
237 char* p = buf;
238 p += su;
239 p -= su;
240}
241
242template <typename T, typename U>
243void TestCompileTU()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected