From 5f63f12aea68bc2cd90c4a86324742339de96da2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Jan 2011 14:03:40 +0200 Subject: Workaround for VC 10 --- odb/cache-traits.hxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/odb/cache-traits.hxx b/odb/cache-traits.hxx index 11c1ed9..596ee35 100644 --- a/odb/cache-traits.hxx +++ b/odb/cache-traits.hxx @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -39,8 +40,10 @@ namespace odb position_type pos_; }; + // Qualify the database type to resolve a phony ambiguity in VC 10. + // static position_type - insert (database& db, const id_type& id, const pointer_type& p) + insert (odb::database& db, const id_type& id, const pointer_type& p) { if (session::has_current ()) return session::current ().insert (db, id, p); @@ -49,7 +52,7 @@ namespace odb } static pointer_type - find (database& db, const id_type& id) + find (odb::database& db, const id_type& id) { if (session::has_current ()) return session::current ().find (db, id); @@ -58,7 +61,7 @@ namespace odb } static void - erase (database& db, const id_type& id) + erase (odb::database& db, const id_type& id) { if (session::has_current ()) session::current ().erase (db, id); @@ -94,16 +97,16 @@ namespace odb }; static position_type - insert (database&, const id_type&, const pointer_type&) + insert (odb::database&, const id_type&, const pointer_type&) { return position_type (); } static pointer_type - find (database&, const id_type&) { return pointer_type (); } + find (odb::database&, const id_type&) { return pointer_type (); } static void - erase (database&, const id_type&) {} + erase (odb::database&, const id_type&) {} static void erase (const position_type&) {} @@ -137,7 +140,7 @@ namespace odb }; static position_type - insert (database&, const id_type&, element_type&) + insert (odb::database&, const id_type&, element_type&) { return position_type (); } @@ -159,7 +162,7 @@ namespace odb insert_guard; static position_type - insert (database& db, const id_type& id, element_type& obj) + insert (odb::database& db, const id_type& id, element_type& obj) { pointer_type p (&obj); return pointer_cache_traits::insert (db, id, p); -- cgit v1.1