From 186e04e576b9a0cad6add09acd658ba4016f3860 Mon Sep 17 00:00:00 2001 From: Chris Djali Date: Wed, 14 Oct 2026 19:15:17 +0100 Subject: [PATCH] remove_cv in writeObjects and readObjects There's no reason const values shouldn't be serialisable, but matchPropertyName can't handle type names with spaces in, so we can't read them back if we write the `const ` prefix or expect it to be in the name we've read. --- include/vsg/io/Input.h | 2 +- include/vsg/io/Output.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vsg/io/Input.h b/include/vsg/io/Input.h index 427021a6e8..55efe6cf9d 100644 --- a/include/vsg/io/Input.h +++ b/include/vsg/io/Input.h @@ -145,7 +145,7 @@ namespace vsg read(1, &numElements); values.resize(numElements); - using element_type = typename T::value_type::element_type; + using element_type = std::remove_cv_t; const char* element_name = type_name(); for (uint32_t i = 0; i < numElements; ++i) diff --git a/include/vsg/io/Output.h b/include/vsg/io/Output.h index cc547e4d52..d02c27849e 100644 --- a/include/vsg/io/Output.h +++ b/include/vsg/io/Output.h @@ -142,7 +142,7 @@ namespace vsg uint32_t numElements = static_cast(values.size()); write(propertyName, numElements); - using element_type = typename T::value_type::element_type; + using element_type = std::remove_cv_t; const char* element_name = type_name(); for (uint32_t i = 0; i < numElements; ++i)