C++ Logo

std-proposals

Advanced search

[std-proposals] constexpr loops

From: Abdullah Qasim <iamminecraftredstoner_at_[hidden]>
Date: Sun, 1 May 2022 07:50:57 +0000
for constexpr ()

for consteval ()



while constexpr ()

while consteval ()



do constexpr {} while ()

do consteval {} while ()



example:



for consteval (int i{ 0 }; i < 1’000’000; ++i) {

    cout << "LOL”;

}

Runtime speed is FAST, w/ these loops.

Easy to implement, too.

Received on 2022-05-01 07:51:00