Skip to content

Commit 02365b8

Browse files
committed
Revert "Allow constructing String from std::variant<const char*,String>&&"
This reverts commit 5970c16.
1 parent 345313b commit 02365b8

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

lib/base/string.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ String::String(String&& other) noexcept
3737
: m_Data(std::move(other.m_Data))
3838
{ }
3939

40-
String::String(std::variant<const char*, String>&& data)
41-
{
42-
if (auto str (std::get_if<String>(&data)); str) {
43-
m_Data = std::move(str->m_Data);
44-
} else {
45-
m_Data = std::get<const char*>(data);
46-
}
47-
}
48-
4940
#ifndef _MSC_VER
5041
String::String(Value&& other)
5142
{

lib/base/string.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <functional>
1212
#include <string>
1313
#include <iosfwd>
14-
#include <variant>
1514

1615
namespace icinga {
1716

@@ -46,7 +45,6 @@ class String
4645
String(String::SizeType n, char c);
4746
String(const String& other);
4847
String(String&& other) noexcept;
49-
String(std::variant<const char*, String>&& data);
5048

5149
#ifndef _MSC_VER
5250
String(Value&& other);

0 commit comments

Comments
 (0)