mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 12:43:52 +00:00
fixi: include windows 2022 (#748)
* ci: include windows 2022 * fix visual studio 2022 issue with std::array and type detection * style: pre-commit.ci fixes * warning fixes Co-authored-by: Philip Top <top1@llnl.gov> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Philip Top <phlptp@gmail.com>
This commit is contained in:
parent
e88700a6da
commit
1a26afab04
@ -57,10 +57,14 @@ jobs:
|
|||||||
Windows11:
|
Windows11:
|
||||||
vmImage: "windows-2019"
|
vmImage: "windows-2019"
|
||||||
cli11.std: 11
|
cli11.std: 11
|
||||||
WindowsLatest:
|
Windows20:
|
||||||
vmImage: "windows-2019"
|
vmImage: "windows-2022"
|
||||||
cli11.std: 20
|
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:
|
Linux17nortti:
|
||||||
vmImage: "ubuntu-latest"
|
vmImage: "ubuntu-latest"
|
||||||
cli11.std: 17
|
cli11.std: 17
|
||||||
|
@ -655,7 +655,8 @@ struct classify_object<
|
|||||||
typename std::enable_if<is_tuple_like<T>::value &&
|
typename std::enable_if<is_tuple_like<T>::value &&
|
||||||
((type_count<T>::value >= 2 && !is_wrapper<T>::value) ||
|
((type_count<T>::value >= 2 && !is_wrapper<T>::value) ||
|
||||||
(uncommon_type<T>::value && !is_direct_constructible<T, double>::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};
|
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
|
// 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
|
// constructed from just the first element so tuples of <string, int,int> can be constructed from a string, which
|
||||||
|
@ -1228,6 +1228,8 @@ TEST_CASE("Types: LexicalConversionTuple3", "[helpers]") {
|
|||||||
TEST_CASE("Types: LexicalConversionTuple4", "[helpers]") {
|
TEST_CASE("Types: LexicalConversionTuple4", "[helpers]") {
|
||||||
CLI::results_t input = {"9.12", "19", "18.6", "5.87"};
|
CLI::results_t input = {"9.12", "19", "18.6", "5.87"};
|
||||||
std::array<double, 4> x;
|
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);
|
bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
|
||||||
CHECK(res);
|
CHECK(res);
|
||||||
CHECK(19 == Approx(std::get<1>(x)));
|
CHECK(19 == Approx(std::get<1>(x)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user