Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: include windows 2022 #748

Merged
merged 5 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ jobs:
Windows11:
vmImage: "windows-2019"
cli11.std: 11
WindowsLatest:
vmImage: "windows-2019"
Windows20:
vmImage: "windows-2022"
cli11.std: 20
cli11.options: -DCMAKE_CXX_FLAGS="/std:c++latest /EHsc"
cli11.options: -DCMAKE_CXX_FLAGS="/EHsc"
WindowsLatest:
vmImage: "windows-2022"
cli11.std: 23
cli11.options: -DCMAKE_CXX_FLAGS="/EHsc"
Linux17nortti:
vmImage: "ubuntu-latest"
cli11.std: 17
Expand Down
3 changes: 2 additions & 1 deletion include/CLI/TypeTools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ struct classify_object<
typename std::enable_if<is_tuple_like<T>::value &&
((type_count<T>::value >= 2 && !is_wrapper<T>::value) ||
(uncommon_type<T>::value && !is_direct_constructible<T, double>::value &&
!is_direct_constructible<T, int>::value))>::type> {
!is_direct_constructible<T, int>::value) ||
(uncommon_type<T>::value && type_count<T>::value >= 2))>::type> {
static constexpr object_category value{object_category::tuple_value};
// the condition on this class requires it be like a tuple, but on some compilers (like Xcode) tuples can be
// constructed from just the first element so tuples of <string, int,int> can be constructed from a string, which
Expand Down
2 changes: 2 additions & 0 deletions tests/HelpersTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,8 @@ TEST_CASE("Types: LexicalConversionTuple3", "[helpers]") {
TEST_CASE("Types: LexicalConversionTuple4", "[helpers]") {
CLI::results_t input = {"9.12", "19", "18.6", "5.87"};
std::array<double, 4> x;
auto tsize = CLI::detail::type_count<decltype(x)>::value;
CHECK(tsize == 4);
bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
CHECK(res);
CHECK(19 == Approx(std::get<1>(x)));
Expand Down