From 096996022fe947ee2434dd41a96d01e42335550b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de> Date: Sat, 4 Mar 2023 21:54:41 +0100 Subject: [PATCH] Replace use of ranges in std::format Formatting ranges is not a part of C++20's std::format, it is proposed in P2286 and might become part of C++23. As it is only a single occurence, the explicit version of printing a FieldVector should be sufficient. --- test/geometry/test_distance.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/geometry/test_distance.cc b/test/geometry/test_distance.cc index b61d11370f..8d6a93b4a8 100644 --- a/test/geometry/test_distance.cc +++ b/test/geometry/test_distance.cc @@ -225,10 +225,10 @@ void runTests() const auto& expectedCenter = firstTriangle.center(); const auto expectedRadius = (firstTriangle.corner(0) - expectedCenter).two_norm(); if ((sphere.center() - expectedCenter).two_norm() > 1e-12*expectedRadius) - DUNE_THROW(Dune::InvalidStateException, Fmt::format( - "Wrong circumsphere center. Expected {}, got {}.", - expectedCenter, sphere.center() - )); + DUNE_THROW(Dune::InvalidStateException, + "Wrong circumsphere center. Expected " + << expectedCenter << " got " << sphere.center() + ); if (Dune::FloatCmp::ne(sphere.radius(), expectedRadius)) DUNE_THROW(Dune::InvalidStateException, Fmt::format( -- GitLab