Bug 104831

Summary: Compile errors in apps using Boost.Python in combination with G++ 3.2+due to missing 'typename'
Product: [Retired] Red Hat Linux Beta Reporter: Dominique Devriese <devriese>
Component: boostAssignee: Benjamin Kosnik <bkoz>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: beta1CC: mnewsome
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-02 16:24:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominique Devriese 2003-09-22 18:04:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)

Description of problem:
There is a known bug in the current Boost.Python releases, namely a missing 'typename' in /usr/include/boost/python/object/make_ptr_instance.hpp.  It affects almost all usage of the Boost.Python library, and is very annoying.

A very simple patch fixes this problem:  It can be paraphrased as replacing "is_polymorphic" by "typename is_polymorphic" on line 40 of make_ptr_instance.hpp.

diff -u -r python-old/object/make_ptr_instance.hpp python/object/make_ptr_instance.hpp
--- python-old/object/make_ptr_instance.hpp     2003-04-22 14:35:28.000000000 +0200
+++ python/object/make_ptr_instance.hpp 2003-06-28 15:09:05.000000000 +0200
@@ -34,7 +34,7 @@
     template <class U>
     static inline PyTypeObject* get_class_object_impl(U const volatile* p)
     {
-        PyTypeObject* derived = get_derived_class_object(is_polymorphic<U>::type(), p);
+        PyTypeObject* derived = get_derived_class_object(typename is_polymorphic<U>::type(), p);
         if (derived)
             return derived;
         return converter::registered<T>::converters.get_class_object();


This patch has also been applied by the Debian sid boost packagers.

Thanks for your work.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Try to compile a simple boost.python application or module, using g++ 3.2 or later.	
    

Actual Results:  Compile error due to missing typename

Expected Results:  should have compiled fine.

Additional info:

Comment 1 Benjamin Kosnik 2004-04-05 22:17:17 UTC
This is fixed in boost-1.31.0-4, which is the current Red Hat package
for boost.

best,
benjamin