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

Function TestConstructors

Archive/releases/4/TestCompile.cpp:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected