[nemiver: 2/2] Port nemiver::common::DynamicModule to OpenBSD



commit 4ad5fd52f24ca721db5bbba47a6380213893dba1
Author: Landry Breuil <landry rhaalovely net>
Date:   Thu Mar 12 14:11:07 2009 +0100

    Port nemiver::common::DynamicModule to OpenBSD
    
    	* common/nmv-dynamic-module.h:
    	(DynamicModule::lookup_interface): Use the template keyword
    	to make the compiler lookup names insides types that are template
    	instantiations. This is not mandated by the C++ spec, but g++ 3.3.5
    	won't work without it.
    	(DynamicModuleManager::load_iface): Likewise.
---
 src/common/nmv-dynamic-module.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/common/nmv-dynamic-module.h b/src/common/nmv-dynamic-module.h
index dfa13d0..f384384 100644
--- a/src/common/nmv-dynamic-module.h
+++ b/src/common/nmv-dynamic-module.h
@@ -201,7 +201,9 @@ public:
             return false ;
         }
         typedef SafePtr<T, ObjectRef, ObjectUnref> TSafePtr ;
-        TSafePtr res = iface.do_dynamic_cast<T> () ;
+        // Here, the 'template' keyword is useless, stricto sensu.
+        // But we need it to keep gcc 3.3.5 happy.
+        TSafePtr res = iface.template do_dynamic_cast<T> () ;
         if (!res) {
             return false ;
         }
@@ -334,7 +336,9 @@ DynamicModuleManager::load_iface (const UString &a_module_name,
     THROW_IF_FAIL (tmp_iface) ;
     LOG_REF_COUNT (module, a_module_name) ;
     TSafePtr result ;
-    result = tmp_iface.do_dynamic_cast<T> ();
+    // Here, the 'template' keyword is useless, stricto sensu.
+    // But we need it to keep gcc 3.3.5 happy.
+    result = tmp_iface.template do_dynamic_cast<T> ();
     LOG_REF_COUNT (module, a_module_name) ;
     if (!result) {
         THROW (UString ("interface named ")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]