Skip to content

Instantly share code, notes, and snippets.

@berkus
Last active August 29, 2015 14:02
Show Gist options
  • Save berkus/36dc64f8f3432de1d95d to your computer and use it in GitHub Desktop.
Save berkus/36dc64f8f3432de1d95d to your computer and use it in GitHub Desktop.
constexpr alloc
#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