]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Skip a type checking test on older boost versions. 4827/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 13 Aug 2017 23:35:19 +0000 (19:35 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 13 Aug 2017 23:37:20 +0000 (19:37 -0400)
Boost 1.57 does not correctly implement static_vector::const_iterator,
but newer versions of boost fix this problem.

tests/base/array_view_09.cc

index 7b95c78680de5802a331ad5f53fcfb543d8bec42..2ccf3d9ec4fd62fc7206566287b3cb6ad7242a20 100644 (file)
@@ -97,6 +97,10 @@ void test ()
 
     const auto a = make_array_view(v.cbegin() + 2, v.cend());
     AssertThrow(a.size() + 2 == v.size(), ExcInternalError());
+    // some older versions of boost (1.57 in particular) do not implement
+    // static_vector::cbegin() and static_vector::cend() correctly, so ignore
+    // the type checking in that case
+#if BOOST_VERSION >= 106200
     // a should be const ArrayView<const double>
     static_assert(std::is_const<decltype(a)>::value,
                   "a should not be const (but has const value)");
@@ -106,6 +110,7 @@ void test ()
                   "type should be const");
     static_assert(is_const_reference<decltype(*a.end())>(),
                   "type should be const");
+#endif
     v[2] = 10.0;
     AssertThrow(a[0] == v[2], ExcInternalError());
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.