1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-01 13:13:53 +00:00

try clang 10 (#459)

* try clang 10

* use helics-builder clang 10 image

* try new image

* try again

* try different flag addition

* try adding cpp20 to visual studio check

* try with the latest flag enabled for visual studio 2019

* try the correct c++ flag

* remove use of std::result_of

* format files
This commit is contained in:
Philip Top 2020-05-21 07:05:32 -07:00 committed by Henry Schreiner
parent 7e6ff84c69
commit 543e7f1577
2 changed files with 18 additions and 1 deletions

View File

@ -62,7 +62,8 @@ jobs:
cli11.std: 11
Windowslatest:
vmImage: 'windows-2019'
cli11.std: 17
cli11.std: 20
cli11.options: -DCMAKE_CXX_FLAG="/std:c++latest"
pool:
vmImage: $(vmImage)
steps:
@ -113,6 +114,10 @@ jobs:
containerImage: silkeh/clang:8
cli11.std: 17
cli11.options: -DCLI11_FORCE_LIBCXX=ON
clang10_20:
containerImage: helics/buildenv:clang10-builder
cli11.std: 20
cli11.options: -DCLI11_FORCE_LIBCXX=ON -DCMAKE_CXX_FLAGS=-std=c++20
container: $[ variables['containerImage'] ]
steps:
- template: .ci/azure-cmake.yml

View File

@ -3055,7 +3055,18 @@ inline std::string help(const App *app, const Error &e) {
namespace detail {
/// This class is simply to allow tests access to App's protected functions
struct AppFriend {
#ifdef CLI11_CPP14
/// Wrap _parse_short, perfectly forward arguments and return
template <typename... Args> static decltype(auto) parse_arg(App *app, Args &&... args) {
return app->_parse_arg(std::forward<Args>(args)...);
}
/// Wrap _parse_subcommand, perfectly forward arguments and return
template <typename... Args> static decltype(auto) parse_subcommand(App *app, Args &&... args) {
return app->_parse_subcommand(std::forward<Args>(args)...);
}
#else
/// Wrap _parse_short, perfectly forward arguments and return
template <typename... Args>
static auto parse_arg(App *app, Args &&... args) ->
@ -3069,6 +3080,7 @@ struct AppFriend {
typename std::result_of<decltype (&App::_parse_subcommand)(App, Args...)>::type {
return app->_parse_subcommand(std::forward<Args>(args)...);
}
#endif
/// Wrap the fallthrough parent function to make sure that is working correctly
static App *get_fallthrough_parent(App *app) { return app->_get_fallthrough_parent(); }
};