add identity traits for new types

develop
Myk Taylor 2023-12-10 21:30:41 -08:00
parent 7bb3b4809d
commit 7132f9d64a
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

@ -50,8 +50,12 @@ namespace df {
OPAQUE_IDENTITY_TRAITS(std::mutex);
OPAQUE_IDENTITY_TRAITS(std::future<void>);
OPAQUE_IDENTITY_TRAITS(std::function<void()>);
OPAQUE_IDENTITY_TRAITS(std::function<bool()>);
OPAQUE_IDENTITY_TRAITS(std::function<int*()>);
OPAQUE_IDENTITY_TRAITS(std::function<std::string()>);
OPAQUE_IDENTITY_TRAITS(std::optional<std::function<void()> >);
OPAQUE_IDENTITY_TRAITS(std::variant<std::string, std::function<void()> >);
OPAQUE_IDENTITY_TRAITS(std::weak_ptr<df::widget_container>);
buffer_container_identity buffer_container_identity::base_instance;
}

@ -37,6 +37,8 @@ distribution.
#include "DataDefs.h"
#include <df/widget_container.h>
namespace std {
class condition_variable;
class mutex;
@ -578,8 +580,12 @@ namespace df
OPAQUE_IDENTITY_TRAITS(std::mutex);
OPAQUE_IDENTITY_TRAITS(std::future<void>);
OPAQUE_IDENTITY_TRAITS(std::function<void()>);
OPAQUE_IDENTITY_TRAITS(std::function<bool()>);
OPAQUE_IDENTITY_TRAITS(std::function<int*()>);
OPAQUE_IDENTITY_TRAITS(std::function<std::string()>);
OPAQUE_IDENTITY_TRAITS(std::optional<std::function<void()> >);
OPAQUE_IDENTITY_TRAITS(std::variant<std::string, std::function<void()> >);
OPAQUE_IDENTITY_TRAITS(std::weak_ptr<df::widget_container>);
#ifdef BUILD_DFHACK_LIB
template<typename T>