@@ -225,6 +225,7 @@ constexpr auto associativeOperatorIterated_regressive(
225225}
226226
227227
228+ // What I don't understand is why this doesn't work?
228229template <typename T>
229230constexpr auto multiply (T a , T b) {
230231 auto operation = [](auto left, auto right, auto count) {
@@ -251,37 +252,6 @@ constexpr auto multiply(T a , T b) {
251252 );
252253}
253254
254- // static_assert(multiply(2, 3) == 6);
255-
256- template <typename T>
257- constexpr auto expo (T base, T exponent) {
258-
259- auto operation = [](auto left, auto right, auto counts) {
260- if (counts) {
261- return left * right;
262- } else {
263- return left;
264- }
265- };
266-
267- auto halver = [](auto counts) {
268- return counts >> 1 ;
269- };
270-
271- constexpr auto numBits = sizeof (T) * 8 ;
272- return associativeOperatorIterated_regressive (
273- base,
274- 1 ,
275- exponent,
276- meta::BitmaskMaker<T, 1 , numBits>().value << 1 ,
277- operation,
278- numBits,
279- halver
280- );
281- }
282-
283- // static_assert(expo(2, 3) == 8, "expo(2, 3) == 8");
284-
285255template <int ActualBits, int NB, typename T>
286256constexpr auto multiplication_OverflowUnsafe_SpecificBitCount (
287257 SWAR<NB, T> multiplicand, SWAR<NB, T> multiplier
0 commit comments