Skip to content

Commit

Permalink
Add std::size_t to any poly types
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 22, 2024
1 parent f1f4754 commit 1185ef0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tesseract_common/include/tesseract_common/any_poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string COMMA std::string>, StdUnorderedMapStringString)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA bool>, StdUnorderedMapStringBool)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA int>, StdUnorderedMapStringInt)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA unsigned>, StdUnorderedMapStringUnsigned)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA double>, StdUnorderedMapStringDouble)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA float>, StdUnorderedMapStringFloat)
TESSERACT_ANY_EXPORT_KEY(std::unordered_map<std::string COMMA std::size_t>, StdUnorderedMapStringStdSizeT)

#endif // TESSERACT_COMMON_ANY_POLY_H
2 changes: 2 additions & 0 deletions tesseract_common/src/any_poly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ 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)
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)
2 changes: 2 additions & 0 deletions tesseract_common/test/tesseract_common_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ TEST(TesseractCommonUnit, anyIntegralTypesUnit) // NOLINT
runAnyPolyIntegralTest<double>(1.2, "double");
runAnyPolyIntegralTest<float>(-0.2F, "float");
runAnyPolyIntegralTest<std::string>("this", "string");
runAnyPolyIntegralTest<std::size_t>(10, "std_size_t");
}

template <typename T>
Expand Down Expand Up @@ -510,6 +511,7 @@ TEST(TesseractCommonUnit, anyUnorderedMapIntegralTypesUnit) // NOLINT
runAnyPolyUnorderedMapIntegralTest<double>(1.2, "double");
runAnyPolyUnorderedMapIntegralTest<float>(-0.2F, "float");
runAnyPolyUnorderedMapIntegralTest<std::string>("this", "string");
runAnyPolyUnorderedMapIntegralTest<std::size_t>(10, "std_size_t");
}

TEST(TesseractCommonUnit, anySharedPtrUnit) // NOLINT
Expand Down

0 comments on commit 1185ef0

Please sign in to comment.