Last active
August 29, 2015 14:10
-
-
Save acgetchell/366e321437665d987d1e to your computer and use it in GitHub Desktop.
docopt.cpp linewrap fail
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 "docopt/docopt.h" | |
#include <iostream> | |
#include <cstdlib> | |
static const char USAGE[] = | |
R"(Causal Dynamical Triangulations in C++ using CGAL. | |
Copyright (c) 2014 Adam Getchell | |
A program that generates d-dimensional triangulated spacetimes | |
with a defined causal structure and evolves them according | |
to the Metropolis algorithm. | |
Usage:./cdt (--spherical | --toroidal) -n=SIMPLICES -t=TIMESLICES [-d=DIM] -k=K -alpha ALPHA | |
Options: | |
-h --help Show this message | |
--version Show program version | |
-n SIMPLICES Approximate number of simplices | |
-t TIMESLICES Number of timeslices | |
-d DIM Dimensionality [default: 3] | |
-k K K constant | |
-alpha ALPHA Alpha constant | |
)"; | |
int main (int argc, char const *argv[]) | |
{ | |
std::map<std::string, docopt::value> args | |
= docopt::docopt(USAGE, | |
{ argv + 1, argv + argc}, | |
true, // print help message automatically | |
"CDT 1.0"); // Version | |
// Debugging | |
for (auto const& arg : args) { | |
std::cout << arg.first << arg.second << std::endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not a docopt.cpp linewrap fail. The error is -alpha should be --alpha or better yet, -a --alpha