1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-05-07 15:23:52 +00:00
Catch2/src/catch2/reporters/catch_reporter_automake.hpp
Morwenn a0ece7b252
Compatility fixes for GCC5 (#2448)
* GCC5 compat: work around inherited constructor issues

Don't use inherited constructors, forward manually instead. This
basically reverts 61f803126d3cff2195d700d11d07c6578f416b23.

I believe that GCC5 does not implement P0136, a C++17 change that made
inherited constructors actually usable and was backported as a DR all
the way to C++11.

* GCC5 compat: bypass std::pair construction issue

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2022-06-07 18:46:46 +02:00

40 lines
1.3 KiB
C++

// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#ifndef CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
#define CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_streaming_base.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>
#include <string>
namespace Catch {
class AutomakeReporter final : public StreamingReporterBase {
public:
// GCC5 compat: we cannot use inherited constructor, because it
// doesn't implement backport of P0136
AutomakeReporter(ReporterConfig&& _config):
StreamingReporterBase(CATCH_MOVE(_config))
{}
~AutomakeReporter() override;
static std::string getDescription() {
using namespace std::string_literals;
return "Reports test results in the format of Automake .trs files"s;
}
void testCaseEnded(TestCaseStats const& _testCaseStats) override;
void skipTest(TestCaseInfo const& testInfo) override;
};
} // end namespace Catch
#endif // CATCH_REPORTER_AUTOMAKE_HPP_INCLUDED