Boost/Python: Solaris build errors
In building the boost/python library on solaris using v6.2.p2 of the sunpro compiler, two compile-time errors occur, one in 'cast.hpp' and the other in 'inheritance.hpp'. Details are below. --bruce ----------------- 1 -------------------- boost/boost/python/cast.hpp: line 65: Error: Default arguments cannot be added in later declarations of the template function in the same scope. 57 template <class Target, class Source> 58 inline Target* downcast(Source* p, yes_convertible) 59 { 60 return static_cast<Target*>(p); 61 } 62 63 template <class Target, class Source> 64 inline Target* downcast(Source* p, no_convertible, boost::type<Target>* = 0) *** 65 { *** 66 typedef typename base_type_traits<Source>::type base; 67 return (Target*)detail::downcast<base>(p, convertible<Source*>::check((base*)0)); 68 } ----------------- 2 -------------------- boost/boost/python/object/inheritance.hpp: line 134: Error: ")" expected instead of ">". 130 template <class Source, class Target> 131 inline void register_conversion( 132 // We need this parameter because CWPro7 can't determine 133 // which is the base reliably. *** 134 bool is_downcast = !cast_generator<Source,Target>::is_upcast *** 132 133 // These parameters shouldn't be used, they're an MSVC bug workaround 134 , Source* = 0, Target* = 0) 135 { 136 typedef typename cast_generator<Source,Target>::type generator; 137 138 add_cast(python::type_id<Source>() 139 , python::type_id<Target>() 140 , &generator::execute 141 , is_downcast); 142 }
I forgot to mention that I am building the CVS version of the library, fresh as of Sun night (2003-01-12). --bruce --- In Boost-Users@yahoogroups.com, "Bruce Lowery <bruce_lowery@y...>" <bruce_lowery@y...> wrote:
In building the boost/python library on solaris using v6.2.p2 of
the
sunpro compiler, two compile-time errors occur, one in 'cast.hpp' and the other in 'inheritance.hpp'. Details are below.
--bruce
----------------- 1 --------------------
boost/boost/python/cast.hpp: line 65: Error: Default arguments cannot be added in later declarations of the template function in the same scope.
57 template <class Target, class Source> 58 inline Target* downcast(Source* p, yes_convertible) 59 { 60 return static_cast<Target*>(p); 61 } 62 63 template <class Target, class Source> 64 inline Target* downcast(Source* p, no_convertible, boost::type<Target>* = 0) *** 65 { *** 66 typedef typename base_type_traits<Source>::type base; 67 return (Target*)detail::downcast<base>(p, convertible<Source*>::check((base*)0)); 68 }
----------------- 2 --------------------
boost/boost/python/object/inheritance.hpp: line 134: Error: ")" expected instead of ">".
130 template <class Source, class Target> 131 inline void register_conversion( 132 // We need this parameter because CWPro7 can't determine 133 // which is the base reliably. *** 134 bool is_downcast = !cast_generator<Source,Target>::is_upcast *** 132 133 // These parameters shouldn't be used, they're an MSVC bug workaround 134 , Source* = 0, Target* = 0) 135 { 136 typedef typename cast_generator<Source,Target>::type generator; 137 138 add_cast(python::type_id<Source>() 139 , python::type_id<Target>() 140 , &generator::execute 141 , is_downcast); 142 }
"Bruce Lowery <bruce_lowery@yahoo.com>" <bruce_lowery@yahoo.com> writes:
I forgot to mention that I am building the CVS version of the library, fresh as of Sun night (2003-01-12).
--bruce
--- In Boost-Users@yahoogroups.com, "Bruce Lowery <bruce_lowery@y...>" <bruce_lowery@y...> wrote:
In building the boost/python library on solaris using v6.2.p2 of
the
sunpro compiler, two compile-time errors occur, one in 'cast.hpp' and the other in 'inheritance.hpp'. Details are below.
--bruce
Bruce, as I replied to you on the boost developers' list, I think you should report these to Sun. I'm really surprised you only see two errors. The last time I tried to get Boost libraries to work with a released Sun compiler (a couple of months ago), I was only able to make Sun pass around 50% of all boost regression tests. It's ability to handle standard C++ constructs was so bad that I don't think there's any hope of getting it to work with Boost.Python. I've heard reports that their pre-release compiler implements a lot of bug fixes needed to work with Boost. Is that what you're using? If so, I still don't have access to this compiler so it's unlikely I'll be able to come up with a workaround for its bugs. If you come up with something that makes it work, please submit a patch! -Dave -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
participants (2)
-
Bruce Lowery <bruce_lowery@yahoo.com>
-
David Abrahams