Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-02-21 11:19:02 +0100
committerMartin Hořeňovský2021-02-21 11:19:02 +0100
commit653764d53bbc6efadf643625d89cb100a7754483 (patch)
tree2df717565aa37f830e11c3c941b47c0641033548 /src/catch2
parent3afea8128a060888db8d5547fd35400c7ecb05e4 (diff)
downloadcatch3-653764d53bbc6efadf643625d89cb100a7754483.tar.gz
Simplify workaround for MSVC issue with XmlWriter
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/internal/catch_xmlwriter.cpp6
-rw-r--r--src/catch2/internal/catch_xmlwriter.hpp7
2 files changed, 4 insertions, 9 deletions
diff --git a/src/catch2/internal/catch_xmlwriter.cpp b/src/catch2/internal/catch_xmlwriter.cpp
index f69256cf..4ea09ab5 100644
--- a/src/catch2/internal/catch_xmlwriter.cpp
+++ b/src/catch2/internal/catch_xmlwriter.cpp
@@ -5,9 +5,11 @@
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
-#include <catch2/internal/catch_xmlwriter.hpp>
-
+// Note: swapping these two includes around causes MSVC to error out
+// while in /permissive- mode. No, I don't know why.
+// Tested on VS 2019, 18.{3, 4}.x
#include <catch2/internal/catch_enforce.hpp>
+#include <catch2/internal/catch_xmlwriter.hpp>
#include <iomanip>
#include <type_traits>
diff --git a/src/catch2/internal/catch_xmlwriter.hpp b/src/catch2/internal/catch_xmlwriter.hpp
index c2e7473e..e1e99659 100644
--- a/src/catch2/internal/catch_xmlwriter.hpp
+++ b/src/catch2/internal/catch_xmlwriter.hpp
@@ -10,13 +10,6 @@
#include <catch2/internal/catch_stream.hpp>
-// FixMe: Without this include (and something inside it), MSVC goes crazy
-// and reports that calls to XmlEncode's op << are ambiguous between
-// the declaration and definition.
-// It also has to be in the header.
-#include <catch2/internal/catch_source_line_info.hpp>
-
-
#include <vector>
namespace Catch {