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

Function TestConstructors

Archive/releases/3/TestCompile.cpp:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template <typename T, typename U>
34void TestConstructors()
35{
36 SafeInt<T> st;
37 SafeInt<U> su;
38 U u;
39 SafeInt<T> st2(u);
40 SafeInt<T> st3(su);
41 // We can also construct from a bool
42 bool b = false;
43 SafeInt<T> st4(b);
44#if !defined SAFEINT_VS_VERSION
45 float f = 0;
46 double d = 0;
47 long double ld = 0;
48 SafeInt<T> st5(f);
49 SafeInt<T> st6(d);
50 SafeInt<T> st7(ld);
51#endif
52}
53
54template <typename T, typename U>
55void TestModulus()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected