From 0fd5e88d6e31e6dc5259fa5428835fe818440abc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Apr 2012 11:45:29 +0200 Subject: VC++ workarounds --- odb/polymorphic-info.hxx | 4 +++- 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 struct polymorphic_concrete_info: polymorphic_abstract_info { + // Have to use access::object_traits directly because of VC10. + // typedef R root_type; - typedef object_traits root_traits; + typedef access::object_traits 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:: insert (const info_type& i) { - polymorphic_map*& pm (root_traits::map); + // VC10 cannot grok constructor call syntax here. + // + polymorphic_map*& pm = root_traits::map; if (pm == 0) pm = new polymorphic_map; @@ -58,7 +60,9 @@ namespace odb void polymorphic_entry_impl:: erase (const info_type& i) { - polymorphic_map*& pm (root_traits::map); + // VC10 cannot grok constructor call syntax here. + // + polymorphic_map*& pm = root_traits::map; pm->discriminator_map_.erase (&i.discriminator); pm->type_map_.erase (&i.type); -- cgit v1.1