template <> struct typenum<my_classes>{ enum {value = 3}; };
template <> struct typenum<my_string>{ enum {value = 4}; };
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4510 4512 4610) // non-copyable non-constructable type
+#endif
+
// my_typeinfo structure is used to save type number
struct my_typeinfo {
const char* const type_;
};
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
const my_typeinfo infos[5] = {
{"void"}, {"my_class"}, {"my_struct"}, {"my_classes"}, {"my_string"}
};
`my_type_index` is a user created type_index class. If in doubt during this phase, you can always
take a look at the `<boost/type_index/ctti_type_index.hpp>` or `<boost/type_index/stl_type_index.hpp>`
files. Documentation for `type_index_facade` could be also useful.
+*/
+/*`
+ Since we are not going to override `type_index_facade::hash_code()` we must additionally include
+ `<boost/functional/hash.hpp>`.
+*/
+#include <boost/functional/hash.hpp>
+
+/*`
See implementation of `my_type_index`:
*/
namespace my_namespace {