Monero
powerof.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 namespace tools
6 {
7  template<uint64_t a, uint64_t b>
8  struct PowerOf
9  {
10  enum Data : uint64_t
11  {
12  // a^b = a * a^(b-1)
13  Value = a * PowerOf<a, b - 1>::Value,
14  };
15  };
16 
17  template<uint64_t a>
18  struct PowerOf<a, 0>
19  {
20  enum Data : uint64_t
21  {
22  // a^0 = 1
23  Value = 1,
24  };
25  };
26 }
Definition: powerof.h:13
Data
Definition: powerof.h:10
Various Tools.
Definition: apply_permutation.h:39
unsigned __int64 uint64_t
Definition: stdint.h:136
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
Definition: powerof.h:8
cryptonote::block b
Definition: block.cpp:40