diff --git a/src/blackmisc/tuple.h b/src/blackmisc/tuple.h
index 435a6d7d3..726e3b1e0 100644
--- a/src/blackmisc/tuple.h
+++ b/src/blackmisc/tuple.h
@@ -239,9 +239,9 @@ namespace BlackMisc
* Can be used like std::tie .
*/
//! @{
- static std::tuple<> toTuple(const T &object);
- static std::tuple<> toTuple(T &object);
- static std::tuple<> constToTuple(const T &object);
+ static std::tuple<> toTuple(const T &object) = delete;
+ static std::tuple<> toTuple(T &object) = delete;
+ static std::tuple<> constToTuple(const T &object) = delete;
//! @}
/*!
@@ -249,22 +249,22 @@ namespace BlackMisc
* \brief Returns a tuple of structs, each of which contains a reference to one of object's data members and its attched metadata.
*/
//! @{
- static std::tuple<> toMetaTuple(const T &object);
- static std::tuple<> toMetaTuple(T &object);
+ static std::tuple<> toMetaTuple(const T &object) = delete;
+ static std::tuple<> toMetaTuple(T &object) = delete;
//! @}
/*!
* \name Static Private Member Functions
* \brief Returns an object with information extracted from the stringified macro argument.
*/
- static const Parser &parser();
+ static const Parser &parser() = delete;
/*!
* \name Static Private Member Functions
* \brief Returns a list of the names of the tuple members.
* \deprecated This information is now embedded in the meta tuples.
*/
- static const QStringList &jsonMembers();
+ static const QStringList &jsonMembers() = delete;
};
// Needed so that our qHash overload doesn't hide the qHash overloads in the global namespace.
@@ -402,7 +402,7 @@ namespace BlackMisc
QJsonObject serializeJson(std::tuple tu)
{
QJsonObject json;
- Private::assertMeta>();
+ Private::assertMeta(tu);
Private::TupleHelper::serializeJson(json, tu, Private::skipFlaggedIndices(tu));
return json;
}
@@ -414,7 +414,7 @@ namespace BlackMisc
template
void deserializeJson(const QJsonObject &json, std::tuple tu)
{
- Private::assertMeta>();
+ Private::assertMeta(tu);
Private::TupleHelper::deserializeJson(json, tu, Private::skipFlaggedIndices(tu));
}
diff --git a/src/blackmisc/tuple_private.h b/src/blackmisc/tuple_private.h
index 16c223c05..2f4e7d961 100644
--- a/src/blackmisc/tuple_private.h
+++ b/src/blackmisc/tuple_private.h
@@ -163,9 +163,9 @@ namespace BlackMisc
// Compile-time assert for functions which require a meta tuple
template
- struct assertMeta { static_assert(std::is_void::value, "Function expected a meta tuple, got a value tuple"); };
+ void assertMeta(const Tu &) { static_assert(std::is_void::value, "Function expected a meta tuple, got a value tuple"); }
template
- struct assertMeta...>> {};
+ void assertMeta(const std::tuple...> &) {}
// Convert a meta tuple to a value tuple
template