diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-30 11:45:29 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-30 11:45:29 +0200 |
commit | 0fd5e88d6e31e6dc5259fa5428835fe818440abc (patch) | |
tree | 436799de249634a34d48c7d1d87c588934f59ecd | |
parent | b40fc36dcf3d196f54a209c046edf0c0820e721b (diff) |
VC++ workarounds
-rw-r--r-- | odb/polymorphic-info.hxx | 4 | ||||
-rw-r--r-- | odb/polymorphic-map.txx | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/odb/polymorphic-info.hxx b/odb/polymorphic-info.hxx index eb444ca..abed648 100644 --- a/odb/polymorphic-info.hxx +++ b/odb/polymorphic-info.hxx @@ -39,8 +39,10 @@ namespace odb template <typename R> struct polymorphic_concrete_info: polymorphic_abstract_info<R> { + // Have to use access::object_traits directly because of VC10. + // typedef R root_type; - typedef object_traits<root_type> root_traits; + typedef access::object_traits<root_type> root_traits; typedef typename root_traits::id_type id_type; typedef typename root_traits::pointer_type pointer_type; typedef typename root_traits::discriminator_type discriminator_type; diff --git a/odb/polymorphic-map.txx b/odb/polymorphic-map.txx index 7b1b81a..d7b6e36 100644 --- a/odb/polymorphic-map.txx +++ b/odb/polymorphic-map.txx @@ -43,7 +43,9 @@ namespace odb void polymorphic_entry_impl<R>:: insert (const info_type& i) { - polymorphic_map<root_type>*& pm (root_traits::map); + // VC10 cannot grok constructor call syntax here. + // + polymorphic_map<root_type>*& pm = root_traits::map; if (pm == 0) pm = new polymorphic_map<root_type>; @@ -58,7 +60,9 @@ namespace odb void polymorphic_entry_impl<R>:: erase (const info_type& i) { - polymorphic_map<root_type>*& pm (root_traits::map); + // VC10 cannot grok constructor call syntax here. + // + polymorphic_map<root_type>*& pm = root_traits::map; pm->discriminator_map_.erase (&i.discriminator); pm->type_map_.erase (&i.type); |