Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatility fixes for GCC5 #2448

Merged
merged 3 commits into from Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/catch2/internal/catch_reporter_spec_parser.cpp
Expand Up @@ -126,7 +126,7 @@ namespace Catch {
return {};
}

auto ret = kvPairs.emplace( kv.key, kv.value );
auto ret = kvPairs.emplace( std::string(kv.key), std::string(kv.value) );
if ( !ret.second ) {
// Duplicated key. We might want to handle this differently,
// e.g. by overwriting the existing value?
Expand Down
6 changes: 5 additions & 1 deletion src/catch2/reporters/catch_reporter_automake.hpp
Expand Up @@ -8,15 +8,19 @@
#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:
using StreamingReporterBase::StreamingReporterBase;
AutomakeReporter(ReporterConfig&& _config):
horenmar marked this conversation as resolved.
Show resolved Hide resolved
StreamingReporterBase(CATCH_MOVE(_config))
{}
horenmar marked this conversation as resolved.
Show resolved Hide resolved
~AutomakeReporter() override;

static std::string getDescription() {
Expand Down
6 changes: 5 additions & 1 deletion src/catch2/reporters/catch_reporter_cumulative_base.hpp
Expand Up @@ -8,7 +8,9 @@
#ifndef CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED
#define CATCH_REPORTER_CUMULATIVE_BASE_HPP_INCLUDED

#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_common_base.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>
#include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.hpp>

Expand Down Expand Up @@ -88,7 +90,9 @@ namespace Catch {
using TestCaseNode = Node<TestCaseStats, SectionNode>;
using TestRunNode = Node<TestRunStats, TestCaseNode>;

using ReporterBase::ReporterBase;
CumulativeReporterBase(ReporterConfig&& _config):
horenmar marked this conversation as resolved.
Show resolved Hide resolved
ReporterBase(CATCH_MOVE(_config))
{}
~CumulativeReporterBase() override;

void benchmarkPreparing( StringRef ) override {}
Expand Down
6 changes: 5 additions & 1 deletion src/catch2/reporters/catch_reporter_streaming_base.hpp
Expand Up @@ -8,15 +8,19 @@
#ifndef CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED
#define CATCH_REPORTER_STREAMING_BASE_HPP_INCLUDED

#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_common_base.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>

#include <vector>

namespace Catch {

class StreamingReporterBase : public ReporterBase {
public:
using ReporterBase::ReporterBase;
StreamingReporterBase(ReporterConfig&& _config):
horenmar marked this conversation as resolved.
Show resolved Hide resolved
ReporterBase(CATCH_MOVE(_config))
{}
~StreamingReporterBase() override;

void benchmarkPreparing( StringRef ) override {}
Expand Down