Skip to content

Commit

Permalink
reporters: silence -Wsubobject-linkage
Browse files Browse the repository at this point in the history
gcc emits `Wsubobject-linkage`, because the the publicly visible
`TablePrinter` contains `ColumnInfo`, which is part of an anonymous
namespace
  • Loading branch information
timblechmann authored and horenmar committed Jan 15, 2024
1 parent 05786fa commit 597ce12
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/catch2/reporters/catch_reporter_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down Expand Up @@ -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<ColumnInfo> m_columnInfos;
Expand Down

0 comments on commit 597ce12

Please sign in to comment.