diff --git a/library/DataIdentity.cpp b/library/DataIdentity.cpp index c041b009d..31df1078c 100644 --- a/library/DataIdentity.cpp +++ b/library/DataIdentity.cpp @@ -49,7 +49,9 @@ namespace df { STL_OPAQUE_IDENTITY_TRAITS(mutex); STL_OPAQUE_IDENTITY_TRAITS(future); STL_OPAQUE_IDENTITY_TRAITS(function); - STL_OPAQUE_IDENTITY_TRAITS(optional >); + STL_OPAQUE_IDENTITY_TRAITS(optional); + OPAQUE_IDENTITY_TRAITS_NAME(std::variant, + "variant"); buffer_container_identity buffer_container_identity::base_instance; } diff --git a/library/include/DataIdentity.h b/library/include/DataIdentity.h index 035f59d4b..dad9f44cc 100644 --- a/library/include/DataIdentity.h +++ b/library/include/DataIdentity.h @@ -31,6 +31,7 @@ distribution. #include #include #include +#include #include #include "DataDefs.h" @@ -576,7 +577,11 @@ namespace df OPAQUE_IDENTITY_TRAITS(std::mutex); OPAQUE_IDENTITY_TRAITS(std::future); OPAQUE_IDENTITY_TRAITS(std::function); - OPAQUE_IDENTITY_TRAITS(std::optional >); + + typedef std::function void_function; + #define COMMA , + OPAQUE_IDENTITY_TRAITS(std::optional); + OPAQUE_IDENTITY_TRAITS(std::variant); #ifdef BUILD_DFHACK_LIB template diff --git a/library/xml b/library/xml index bdf4b660d..e049cb4df 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit bdf4b660d5282fdf722293609675a633fd5a641e +Subproject commit e049cb4df86d116689c0ef84bf1962d282b7b880