better-enums/example/1-hello-world.cc
Anton Bachin 2acb5743fa Complete documentation and testing overhaul.
The documentation is now generated from markdown. Samples are generated from the
tutorial pages. Testing is done by a Python script which runs the tests for a
large number of compilers.

This version is not very developer-friendly - the Python scripts need ways of
limiting what compilers they try to run. If you don't have 15 compilers
installed, you won't be able to run the tests in this commit. Fix coming soon.
2015-05-27 09:58:34 -05:00

24 lines
493 B
C++

// This file was generated automatically
// Hello, World!
//
// Download <a $download>enum.h</a>, then build this program with it:
#include <iostream>
#include "enum.h"
ENUM(Word, int, Hello, World)
int main()
{
std::cout << (+Word::Hello)._to_string() << ", "
<< (+Word::World)._to_string() << "!"
<< std::endl;
return 0;
}
// Run it, and you should see the output "Hello, World!"
//
// Congratulations, you have just created your first Better Enum!