Skip to content

Commit

Permalink
try clang 10 (#459)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
phlptp authored and henryiii committed Jun 2, 2020
1 parent 7e6ff84 commit 543e7f1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions include/CLI/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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(); }
};
Expand Down

0 comments on commit 543e7f1

Please sign in to comment.