aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/type-info.hxx40
1 files changed, 40 insertions, 0 deletions
diff --git a/odb/details/type-info.hxx b/odb/details/type-info.hxx
new file mode 100644
index 0000000..656b789
--- /dev/null
+++ b/odb/details/type-info.hxx
@@ -0,0 +1,40 @@
+// file : odb/details/type-info.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_DETAILS_TYPE_INFO_HXX
+#define ODB_DETAILS_TYPE_INFO_HXX
+
+#include <odb/pre.hxx>
+
+#include <typeinfo>
+
+#include <odb/details/export.hxx>
+
+namespace odb
+{
+ namespace details
+ {
+ struct LIBODB_EXPORT type_info_comparator
+ {
+ bool
+ operator() (const std::type_info* x, const std::type_info* y) const
+ {
+ // XL C++ on AIX has buggy type_info::before() in that
+ // it returns true for two different type_info objects
+ // that happened to be for the same type.
+ //
+#if defined(__xlC__) && defined(_AIX)
+ return *x != *y && x->before (*y);
+#else
+ return x->before (*y);
+#endif
+ }
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_DETAILS_TYPE_INFO_HXX