summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/slicer/modelPartsTypes.cpp4
-rw-r--r--slicer/slicer/modelPartsTypes.h12
2 files changed, 16 insertions, 0 deletions
diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp
index e65d721..0fa502b 100644
--- a/slicer/slicer/modelPartsTypes.cpp
+++ b/slicer/slicer/modelPartsTypes.cpp
@@ -27,6 +27,10 @@ namespace Ice {
}
namespace Slicer {
+ static_assert(!isOptional<int>::value);
+ static_assert(isOptional<::Ice::optional<int>>::value);
+ static_assert(isOptional<::IceUtil::Optional<int>>::value);
+
using ClassRefMap = std::map<std::string, const ClassRefBase *, std::less<>>;
using ClassNamePair = std::pair<std::string_view, std::string>;
using ClassNameMap = boost::multi_index_container<ClassNamePair,
diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h
index e73b99c..93339db 100644
--- a/slicer/slicer/modelPartsTypes.h
+++ b/slicer/slicer/modelPartsTypes.h
@@ -21,6 +21,18 @@ namespace Slicer {
static constexpr bool value = false;
};
+ template<typename T> struct isLocal<::Ice::optional<T>> {
+ static constexpr bool value = isLocal<T>::value;
+ };
+
+ template<typename T> struct isOptional {
+ static constexpr bool value = false;
+ };
+
+ template<typename T> struct isOptional<::Ice::optional<T>> {
+ static constexpr bool value = true;
+ };
+
DLL_PUBLIC bool optionalCaseEq(std::string_view a, std::string_view b, bool matchCase);
template<typename T> class ModelPartForRoot : public ModelPartForRootBase {