/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <type_traits>
using namespace std;
struct frase : std::integral_constant<bool, false> {
static constexpr bool value()
{
return std::integral_constant<bool, false>::value;
}
static bool is_false() { return frase() == false; }
operator bool ()
{
return ((frase&)*this).value();
}
};
int main()
{
cout << "__result0: " << frase::value()
<< ", __result1: " << (bool)(frase())
<< ". The frase is false :" << frase::is_false() << std::endl;
return 0;
}