add identity for variant

develop
Myk Taylor 2023-12-10 02:25:53 -08:00
parent e45a59ca03
commit 75b760a496
No known key found for this signature in database
3 changed files with 10 additions and 3 deletions

@ -49,7 +49,9 @@ namespace df {
STL_OPAQUE_IDENTITY_TRAITS(mutex);
STL_OPAQUE_IDENTITY_TRAITS(future<void>);
STL_OPAQUE_IDENTITY_TRAITS(function<void()>);
STL_OPAQUE_IDENTITY_TRAITS(optional<std::function<void()> >);
STL_OPAQUE_IDENTITY_TRAITS(optional<void_function>);
OPAQUE_IDENTITY_TRAITS_NAME(std::variant<std::string COMMA void_function>,
"variant<string, void_function>");
buffer_container_identity buffer_container_identity::base_instance;
}

@ -31,6 +31,7 @@ distribution.
#include <sstream>
#include <string>
#include <unordered_map>
#include <variant>
#include <vector>
#include "DataDefs.h"
@ -576,7 +577,11 @@ namespace df
OPAQUE_IDENTITY_TRAITS(std::mutex);
OPAQUE_IDENTITY_TRAITS(std::future<void>);
OPAQUE_IDENTITY_TRAITS(std::function<void()>);
OPAQUE_IDENTITY_TRAITS(std::optional<std::function<void()> >);
typedef std::function<void()> void_function;
#define COMMA ,
OPAQUE_IDENTITY_TRAITS(std::optional<void_function>);
OPAQUE_IDENTITY_TRAITS(std::variant<std::string COMMA void_function>);
#ifdef BUILD_DFHACK_LIB
template<typename T>

@ -1 +1 @@
Subproject commit bdf4b660d5282fdf722293609675a633fd5a641e
Subproject commit e049cb4df86d116689c0ef84bf1962d282b7b880