Quantcast

Re: [C++-sig] C++-sig Digest, Vol 26, Issue 11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [C++-sig] C++-sig Digest, Vol 26, Issue 11

anewtroll

    Thank you Dave, I was wondering about the best way of creating python extensions under windows. Is it better to use VC6 or GCC !

       ANT

[hidden email] a écrit :
Send C++-sig mailing list submissions to
	[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.python.org/mailman/listinfo/c++-sig
or, via email, send a message with subject or body 'help' to
	[hidden email]

You can reach the person managing the list at
	[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of C++-sig digest..."
  

Today's Topics: 1. Re: boost, const and problems (David Abrahams) 2. Re: VC 2005 error when wrapping constructor with const argument (David Abrahams)



Sujet:
Re: [C++-sig] boost, const and problems
Expéditeur:
David Abrahams [hidden email]
Date:
Mon, 12 Sep 2005 00:19:57 +0200
Destinataire:
[hidden email]
Destinataire:
[hidden email]

"Ralf W. Grosse-Kunstleve" [hidden email] writes:

  
2005/9/9, anewtroll [hidden email]:
      
Hi !
As a newbie to boost.python, I would like to know why the "const"
argument (i.e. void function(const float t){ ... }) causes an error when
using the bjam (VC++6)
        
IIRC, this is a general VC6 bug; "const float" or similar doesn't work with
that compiler.
Ralf
    

Just remove it from the function declaration; it has no effect there
anyway other than to mess up Boost.Python.  You can leave the const on
the function definition.

  



Sujet:
Re: [C++-sig] VC 2005 error when wrapping constructor with const argument
Expéditeur:
David Abrahams [hidden email]
Date:
Mon, 12 Sep 2005 00:22:22 +0200
Destinataire:
[hidden email]
Destinataire:
[hidden email]

"Albert Strasheim" [hidden email] writes:

  
Hello all

I recently came across a problem when wrapping classes with constructors 
that take const arguments with Visual C++ 2005 Express Edition Beta 2.

I am using Boost 1.33.0 with Python 2.4.1.

The test case (breaks on VC EE 2005, compiles on VC .NET 2003):

#include <boost/python.hpp>
class Foo {
public:
  Foo(){}
  Foo(const double){}
};
void Export_Foo()
{
  boost::python::class_<Foo>("Foo", boost::python::init<>())
    .def(boost::python::init<const double>())
    ;
}
    

Function parameters declared const are ignored by C++, except for the
purposes of function definitions.  Just remove the const; it doesn't
belong there.

  

_______________________________________________ C++-sig mailing list [hidden email] http://mail.python.org/mailman/listinfo/c++-sig

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Loading...