From 0b54f944bca8ea8f7b42395586a9c3a04fb85516 Mon Sep 17 00:00:00 2001 From: Lauri Nurmi Date: Thu, 21 May 2020 21:11:10 +0300 Subject: [PATCH] Fix compilation of wxGrid unit tests with VC10 (VS2010) VC10 does not support range-based for-loops, they were only introduced in VC11 (VS2012): https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/hh409293(v=vs.110) Closes https://github.com/wxWidgets/wxWidgets/pull/1863 --- tests/controls/gridtest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index 7bffd9be71..3649985b36 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -554,7 +554,7 @@ TEST_CASE_METHOD(GridTestCase, "Grid::SelectionRange", "[grid]") REQUIRE( sel.begin() != sel.end() ); CHECK( *sel.begin() == wxGridBlockCoords(1, 0, 3, 1) ); -#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10) +#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(11) m_grid->SelectBlock(4, 0, 7, 1, true); int index = 0; for ( const wxGridBlockCoords& block : m_grid->GetSelectedBlocks() )