base: Use constexpr in Cycles
base: Use constexpr in Cycles

Declare the constructor and all of the operators that don't change the
state of a Cycles instance as constexpr. This makes it possible to use
Cycles as a static constant and allows the compiler to evaulate simple
expressions at compile time. An unfortunate side-effect of this is
that we cannot use assertions since C++11 doesn't support them in
constexpr functions. As a workaround, we throw an invalid_argument
exception when the assert would have triggered. A nice side-effect of
this is that the compiler will evaluate the "assertion" at compile
time when an expression involving Cycles can be statically evaluated.

powerjg/gem5-ci-test,powerjg/gem5-ci-test,gedare/gem5,powerjg/gem5-ci-test,SanchayanMaity/gem5,powerjg/gem5-ci-test,gem5/gem5,Weil0ng/gem5,sobercoder/gem5,briancoutinho0905/2dsampling,briancoutinho0905/2dsampling,SanchayanMaity/gem5,aclifton/cpeg853-gem5,TUD-OS/gem5-dtu,cancro7/gem5,rallylee/gem5,gedare/gem5,Weil0ng/gem5,rjschof/gem5,SanchayanMaity/gem5,HwisooSo/gemV-update,HwisooSo/gemV-update,qizenguf/MLC-STT,rallylee/gem5,TUD-OS/gem5-dtu,briancoutinho0905/2dsampling,TUD-OS/gem5-dtu,sobercoder/gem5,HwisooSo/gemV-update,sobercoder/gem5,cancro7/gem5,Weil0ng/gem5,KuroeKurose/gem5,KuroeKurose/gem5,SanchayanMaity/gem5,sobercoder/gem5,gedare/gem5,KuroeKurose/gem5,gem5/gem5,KuroeKurose/gem5,TUD-OS/gem5-dtu,Weil0ng/gem5,qizenguf/MLC-STT,rjschof/gem5,sobercoder/gem5,rallylee/gem5,SanchayanMaity/gem5,gem5/gem5,TUD-OS/gem5-dtu,cancro7/gem5,qizenguf/MLC-STT,HwisooSo/gemV-update,gedare/gem5,rjschof/gem5,sobercoder/gem5,briancoutinho0905/2dsampling,rjschof/gem5,gedare/gem5,aclifton/cpeg853-gem5,rallylee/gem5,briancoutinho0905/2dsampling,gedare/gem5,powerjg/gem5-ci-test,KuroeKurose/gem5,Weil0ng/gem5,qizenguf/MLC-STT,rallylee/gem5,HwisooSo/gemV-update,rallylee/gem5,aclifton/cpeg853-gem5,rallylee/gem5,KuroeKurose/gem5,rjschof/gem5,KuroeKurose/gem5,qizenguf/MLC-STT,SanchayanMaity/gem5,Weil0ng/gem5,rjschof/gem5,powerjg/gem5-ci-test,qizenguf/MLC-STT,sobercoder/gem5,aclifton/cpeg853-gem5,HwisooSo/gemV-update,cancro7/gem5,powerjg/gem5-ci-test,rjschof/gem5,aclifton/cpeg853-gem5,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,briancoutinho0905/2dsampling,cancro7/gem5,Weil0ng/gem5,cancro7/gem5,gedare/gem5,SanchayanMaity/gem5,cancro7/gem5,aclifton/cpeg853-gem5,aclifton/cpeg853-gem5,qizenguf/MLC-STT,briancoutinho0905/2dsampling,HwisooSo/gemV-update,gem5/gem5