Skip to content

Instantly share code, notes, and snippets.

@playmer
Created October 10, 2016 19:56
Show Gist options
  • Save playmer/ace67f3b35aef24877dbe1826fda971f to your computer and use it in GitHub Desktop.
Save playmer/ace67f3b35aef24877dbe1826fda971f to your computer and use it in GitHub Desktop.
#include <iostream>
struct Test
{
int mNumber;
constexpr Test(int aNumber)
: mNumber(aNumber) {}
constexpr bool BooleanCheck(int aNumber)
{
if (mNumber == aNumber)
{
return true;
}
else
{
return false;
}
}
};
int main()
{
constexpr Test test1{ 1 };
constexpr bool test = test1.BooleanCheck(2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment