Created
October 10, 2016 19:56
-
-
Save playmer/ace67f3b35aef24877dbe1826fda971f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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