Commit af46f59c authored by Dominik Charousset's avatar Dominik Charousset

Add missing type to type name builder

parent 3702fd4d
...@@ -34,28 +34,28 @@ struct type_name_builder_int_size; ...@@ -34,28 +34,28 @@ struct type_name_builder_int_size;
template <> template <>
struct type_name_builder_int_size<1> { struct type_name_builder_int_size<1> {
inline void operator()(std::string& result) const { void operator()(std::string& result) const {
result += "8"; result += "8";
} }
}; };
template <> template <>
struct type_name_builder_int_size<2> { struct type_name_builder_int_size<2> {
inline void operator()(std::string& result) const { void operator()(std::string& result) const {
result += "16"; result += "16";
} }
}; };
template <> template <>
struct type_name_builder_int_size<4> { struct type_name_builder_int_size<4> {
inline void operator()(std::string& result) const { void operator()(std::string& result) const {
result += "32"; result += "32";
} }
}; };
template <> template <>
struct type_name_builder_int_size<8> { struct type_name_builder_int_size<8> {
inline void operator()(std::string& result) const { void operator()(std::string& result) const {
result += "64"; result += "64";
} }
}; };
...@@ -65,45 +65,32 @@ struct type_name_builder; ...@@ -65,45 +65,32 @@ struct type_name_builder;
template <> template <>
struct type_name_builder<bool, true> { struct type_name_builder<bool, true> {
inline void operator()(std::string& result) const { void operator()(std::string& result) const {
result += "boolean"; result += "boolean";
} }
}; };
template <> #define CAF_TYPE_NAME_BUILDER_NOINT(class_name, pretty_name) \
struct type_name_builder<float, false> { template <> \
inline void operator()(std::string& result) const { struct type_name_builder<class_name, false> { \
result += "32-bit real"; void operator()(std::string& result) const { \
result += pretty_name; \
} \
} }
};
template <> CAF_TYPE_NAME_BUILDER_NOINT(float, "32-bit real");
struct type_name_builder<double, false> {
inline void operator()(std::string& result) const {
result += "64-bit real";
}
};
template <> CAF_TYPE_NAME_BUILDER_NOINT(double, "64-bit real");
struct type_name_builder<timespan, false> {
inline void operator()(std::string& result) const {
result += "timespan";
}
};
template <> CAF_TYPE_NAME_BUILDER_NOINT(timespan, "timespan");
struct type_name_builder<std::string, false> {
inline void operator()(std::string& result) const {
result += "string";
}
};
template <> CAF_TYPE_NAME_BUILDER_NOINT(std::string, "string");
struct type_name_builder<atom_value, false> {
inline void operator()(std::string& result) const { CAF_TYPE_NAME_BUILDER_NOINT(atom_value, "atom");
result += "atom";
} CAF_TYPE_NAME_BUILDER_NOINT(uri, "uri");
};
#undef CAF_TYPE_NAME_BUILDER
template <class T> template <class T>
struct type_name_builder<T, true> { struct type_name_builder<T, true> {
...@@ -145,4 +132,3 @@ std::string type_name() { ...@@ -145,4 +132,3 @@ std::string type_name() {
} // namespace detail } // namespace detail
} // namespace caf } // namespace caf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment