Bug 104831 - Compile errors in apps using Boost.Python in combination with G++ 3.2+due to missing 'typename'
Compile errors in apps using Boost.Python in combination with G++ 3.2+due to ...
Product: Red Hat Linux Beta
Classification: Retired
Component: boost (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Benjamin Kosnik
Depends On:
  Show dependency treegraph
Reported: 2003-09-22 14:04 EDT by Dominique Devriese
Modified: 2013-08-09 01:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-02 11:24:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dominique Devriese 2003-09-22 14:04:17 EDT
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:

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 18:17:17 EDT
This is fixed in boost-1.31.0-4, which is the current Red Hat package
for boost.


Note You need to log in before you can comment on or make changes to this bug.