File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -24,22 +24,19 @@ template<unsigned int BITS>
24
24
class base_uint
25
25
{
26
26
protected:
27
+ static_assert (BITS / 32 > 0 && BITS % 32 == 0 , " Template parameter BITS must be a positive multiple of 32." );
27
28
static constexpr int WIDTH = BITS / 32 ;
28
29
uint32_t pn[WIDTH];
29
30
public:
30
31
31
32
base_uint ()
32
33
{
33
- static_assert (BITS/32 > 0 && BITS%32 == 0 , " Template parameter BITS must be a positive multiple of 32." );
34
-
35
34
for (int i = 0 ; i < WIDTH; i++)
36
35
pn[i] = 0 ;
37
36
}
38
37
39
38
base_uint (const base_uint& b)
40
39
{
41
- static_assert (BITS/32 > 0 && BITS%32 == 0 , " Template parameter BITS must be a positive multiple of 32." );
42
-
43
40
for (int i = 0 ; i < WIDTH; i++)
44
41
pn[i] = b.pn [i];
45
42
}
@@ -53,8 +50,6 @@ class base_uint
53
50
54
51
base_uint (uint64_t b)
55
52
{
56
- static_assert (BITS/32 > 0 && BITS%32 == 0 , " Template parameter BITS must be a positive multiple of 32." );
57
-
58
53
pn[0 ] = (unsigned int )b;
59
54
pn[1 ] = (unsigned int )(b >> 32 );
60
55
for (int i = 2 ; i < WIDTH; i++)
You can’t perform that action at this time.
0 commit comments