From ead051438c4374d2f489f2284db49c15e22f8e17 Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Mon, 22 Jul 2024 14:16:30 -0500 Subject: [PATCH] Add std::size_t to any poly types --- tesseract_common/include/tesseract_common/any_poly.h | 2 ++ tesseract_common/src/any_poly.cpp | 2 ++ tesseract_common/test/tesseract_common_unit.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tesseract_common/include/tesseract_common/any_poly.h b/tesseract_common/include/tesseract_common/any_poly.h index 28552240696..0650cb46d93 100644 --- a/tesseract_common/include/tesseract_common/any_poly.h +++ b/tesseract_common/include/tesseract_common/any_poly.h @@ -143,11 +143,13 @@ TESSERACT_ANY_EXPORT_KEY(unsigned, IntegralUnsigned) TESSERACT_ANY_EXPORT_KEY(double, IntegralDouble) TESSERACT_ANY_EXPORT_KEY(float, IntegralFloat) TESSERACT_ANY_EXPORT_KEY(std::string, StdString) +TESSERACT_ANY_EXPORT_KEY(std::size_t, StdSizeT) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringString) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringBool) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringInt) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringUnsigned) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringDouble) TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringFloat) +TESSERACT_ANY_EXPORT_KEY(std::unordered_map, StdUnorderedMapStringStdSizeT) #endif // TESSERACT_COMMON_ANY_POLY_H diff --git a/tesseract_common/src/any_poly.cpp b/tesseract_common/src/any_poly.cpp index 1519701f85b..50dacae93f7 100644 --- a/tesseract_common/src/any_poly.cpp +++ b/tesseract_common/src/any_poly.cpp @@ -51,6 +51,7 @@ TESSERACT_ANY_EXPORT_IMPLEMENT(IntegralUnsigned) TESSERACT_ANY_EXPORT_IMPLEMENT(IntegralDouble) TESSERACT_ANY_EXPORT_IMPLEMENT(IntegralFloat) TESSERACT_ANY_EXPORT_IMPLEMENT(StdString) +TESSERACT_ANY_EXPORT_IMPLEMENT(StdSizeT) TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringString) TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringBool) @@ -58,3 +59,4 @@ TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringInt) TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringUnsigned) TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringDouble) TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringFloat) +TESSERACT_ANY_EXPORT_IMPLEMENT(StdUnorderedMapStringStdSizeT) diff --git a/tesseract_common/test/tesseract_common_unit.cpp b/tesseract_common/test/tesseract_common_unit.cpp index c32b0f307e6..48624499db7 100644 --- a/tesseract_common/test/tesseract_common_unit.cpp +++ b/tesseract_common/test/tesseract_common_unit.cpp @@ -458,6 +458,7 @@ TEST(TesseractCommonUnit, anyIntegralTypesUnit) // NOLINT runAnyPolyIntegralTest(1.2, "double"); runAnyPolyIntegralTest(-0.2F, "float"); runAnyPolyIntegralTest("this", "string"); + runAnyPolyIntegralTest(10, "std_size_t"); } template @@ -510,6 +511,7 @@ TEST(TesseractCommonUnit, anyUnorderedMapIntegralTypesUnit) // NOLINT runAnyPolyUnorderedMapIntegralTest(1.2, "double"); runAnyPolyUnorderedMapIntegralTest(-0.2F, "float"); runAnyPolyUnorderedMapIntegralTest("this", "string"); + runAnyPolyUnorderedMapIntegralTest(10, "std_size_t"); } TEST(TesseractCommonUnit, anySharedPtrUnit) // NOLINT