I am trying to use bit_ceil()
, I included the <bit>
header, and used the std
namespace (I know that it is not a good practice, but I did it here for the sake of the question).
But when I try to use the function it just raises an error 'bit_ceil' was not declared in this scope
.
#include<iostream>
#include <bit>
using namespace std;
int main ()
{
int x = 1;
x = bit_ceil(x);
}
Weird, anyone got an idea?
The questions regarding this function are scarce around the internet.
It is something introduced in C++20 so you need to add in your command line (if using GCC) -std=c++20