8000 Merge pull request #4 from docopt/fix-2 · JasCodes/docopt.cpp@c343367 · GitHub
[go: up one dir, main page]

Skip to content

Commit c343367

Browse files
committed
Merge pull request docopt#4 from docopt/fix-2
Fix docopt#2: Adjust a decltype to make gcc-4.9 happy
2 parents ea3a2ee + 88def0f commit c343367

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,15 @@ and we have tried to maintain full feature parity (and code structure) as the
7171
original.
7272

7373
This port is written in C++11 and also requires a good C++11 standard library
74-
(in particular, one with ``regex`` support). The following compilers should
75-
be able to handle this:
74+
(in particular, one with ``regex`` support). The following compilers are known
75+
to work with docopt:
7676

77-
- clang 3.3
78-
- gcc 4.9 (If someone can verify this, or provide patches, that would be great!)
79-
- Visual C++ 2013: will *not* compile this code. Hopefully next year.
77+
- clang 3.3 and later
78+
- gcc 4.9
79+
80+
Note that gcc-4.8 will not work due to its missing the ``regex`` module.
81+
Note that Visual C++ 2013 will not compile this code, as its C++11 is not
82+
quite good enough. If a later VC++ works, please let me know!
8083

8184
This port is licensed under the MIT license, just like the original module.
8285
However, we are also dual-licensing this code under the Boost License, version 1.0,
@@ -436,4 +439,5 @@ Changelog
436439
**docopt** follows `semantic versioning <http://semver.org>`_. The
437440
first release with stable API will be 1.0.0 (soon).
438441

439-
- 0.6.4.1 The initial C++ port of docopt.py
442+
- 0.6.1 The initial C++ port of docopt.py
443+

docopt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ std::vector<std::string> longOptions(I iter, I end) {
589589
std::vector<std::string> ret;
590590
std::transform(iter, end,
591591
std::back_inserter(ret),
592-
[](decltype(*iter) const& opt) { return opt->longOption(); });
592+
[](typename I::reference opt) { return opt->longOption(); });
593593
return ret;
594594
}
595595

0 commit comments

Comments
 (0)
0