Below is code that will compile when INT_MAX is equal to 232. It will generate a compiler error when INT_MAX is not equal to 232.
#include <iostream>
#include <climits>
namespace NBitCheck
{
template<bool> struct CTAssert;
template<> struct CTAssert<true> {};
constexpr bool intbitwidthcheck=INT_MAX-(2^32)+1;
CTAssert<intbitwidthcheck> a;
}
int main(void) {
return 0;
}