diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c519e153..d9e44872 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 diff --git a/include/CLI/TypeTools.hpp b/include/CLI/TypeTools.hpp index e3c97b17..2048a014 100644 --- a/include/CLI/TypeTools.hpp +++ b/include/CLI/TypeTools.hpp @@ -655,7 +655,8 @@ struct classify_object< typename std::enable_if::value && ((type_count::value >= 2 && !is_wrapper::value) || (uncommon_type::value && !is_direct_constructible::value && - !is_direct_constructible::value))>::type> { + !is_direct_constructible::value) || + (uncommon_type::value && type_count::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 can be constructed from a string, which diff --git a/tests/HelpersTest.cpp b/tests/HelpersTest.cpp index 798a6d13..44e15520 100644 --- a/tests/HelpersTest.cpp +++ b/tests/HelpersTest.cpp @@ -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 x; + auto tsize = CLI::detail::type_count::value; + CHECK(tsize == 4); bool res = CLI::detail::lexical_conversion(input, x); CHECK(res); CHECK(19 == Approx(std::get<1>(x)));