From 57419407e931555cb4841b9a3cc0a01f5f60cdcc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Sep 2011 08:42:40 +0200 Subject: Workaround for VC9 --- odb/query.hxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/odb/query.hxx b/odb/query.hxx index d89a4e6..e8683ae 100644 --- a/odb/query.hxx +++ b/odb/query.hxx @@ -41,25 +41,33 @@ namespace odb } }; + // VC9 cannot handle certain cases of non-type arguments with default + // values in template functions (e.g., database::query()). As a result, + // we have to use the impl trick below instead of simply having kind + // as a second template argument with a default value. // - // - template ::kind> - struct query_selector; + template + struct query_selector_impl; template - struct query_selector + struct query_selector_impl { typedef typename object_traits::query_base_type base_type; typedef typename object_traits::query_type type; }; template - struct query_selector + struct query_selector_impl { typedef typename view_traits::query_base_type base_type; typedef typename view_traits::query_type type; }; + template + struct query_selector: query_selector_impl::kind> + { + }; + template ::base_type> class query; -- cgit v1.1