8000 Fix #2: gcc-4.9 didnt like one of the decltype constructs · AmesianX/docopt.cpp@e5df425 · GitHub
[go: up one dir, main page]

Skip to content

Commit e5df425

Browse files
committed
Fix docopt#2: gcc-4.9 didnt like one of the decltype constructs
1 parent ea3a2ee commit e5df425

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

README.rst

Lines changed: 8 additions & 5 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,

docopt.cpp

-1Lines 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