]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/type_index/examples/user_defined_typeinfo.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / type_index / examples / user_defined_typeinfo.hpp
index 5690a00223c261b0b4c823ab1a03ac62b38e2f4a..4bd7ff09d399595f2aa4e9295bc4aa4e2f8c2e47 100644 (file)
@@ -47,11 +47,20 @@ namespace my_namespace { namespace detail {
     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"}
     };
@@ -70,7 +79,15 @@ namespace my_namespace { namespace detail {
     `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 {