Last active
August 29, 2015 14:02
-
-
Save berkus/36dc64f8f3432de1d95d to your computer and use it in GitHub Desktop.
constexpr alloc
This file contains 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> | |
class Boo | |
{ | |
public: | |
static constexpr char const* string_of_kind[5] = {"FREE", "EXEC", "READ", "WRITE", "INITRD"}; | |
}; | |
constexpr char const* Boo::string_of_kind[]; | |
int main() | |
{ | |
std::cout << Boo::string_of_kind[1] << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment