From 597ce12b6535be0e579a4bd08683fa1cebc5919e Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Wed, 10 Jan 2024 17:42:46 +0800 Subject: [PATCH] reporters: silence -Wsubobject-linkage gcc emits `Wsubobject-linkage`, because the the publicly visible `TablePrinter` contains `ColumnInfo`, which is part of an anonymous namespace --- src/catch2/reporters/catch_reporter_console.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp index 81fc656fee..f3b8b5b14d 100644 --- a/src/catch2/reporters/catch_reporter_console.cpp +++ b/src/catch2/reporters/catch_reporter_console.cpp @@ -209,13 +209,6 @@ findMax( std::size_t& i, std::size_t& j, std::size_t& k, std::size_t& l ) { return l; } -enum class Justification { Left, Right }; - -struct ColumnInfo { - std::string name; - std::size_t width; - Justification justification; -}; struct ColumnBreak {}; struct RowBreak {}; struct OutputFlush {}; @@ -293,6 +286,14 @@ class Duration { }; } // end anon namespace +enum class Justification { Left, Right }; + +struct ColumnInfo { + std::string name; + std::size_t width; + Justification justification; +}; + class TablePrinter { std::ostream& m_os; std::vector m_columnInfos;