Hi,
since I've read in the documentation
"Boost.Python is known to have been tested in the following configurations:
Against Python 2.0 using the following compiler/library combinations:
MSVC++6sp4 with the native library.
...
Against Python 1.5.2 using the following compiler/library:
MSVC++6sp4
MSVC++6sp4/STLport 4.0"
and since I am using the MSVC++6sp4/STLport 4.0 combination I deinstalled
Python 2.2 (for which the build failed) and installed Python 1.5.2.
Running
G:\Environment\boost_1_27_0>jam -sBOOST_ROOT=. -sTOOLS="msvc-stlport"
I get the following errors:
don't know how to make
"Albrecht Fritzsche"
Hi,
since I've read in the documentation
"Boost.Python is known to have been tested in the following configurations: Against Python 2.0 using the following compiler/library combinations: MSVC++6sp4 with the native library. ... Against Python 1.5.2 using the following compiler/library: MSVC++6sp4 MSVC++6sp4/STLport 4.0"
and since I am using the MSVC++6sp4/STLport 4.0 combination I deinstalled Python 2.2 (for which the build failed) and installed Python 1.5.2.
1. Get the latest CVS state. Release 1.27 is broken in several ways. 2. Look at the current state of compiler interoperability at libs/python/doc/index.html, or online at http://makeashorterlink.com/?R52A12AC
What am I doing wrong? By the way, all of the other libs including tests are compiling with Jam without any problems at all.
Part of it has to do with configuring Python. The latest CVS state will give you instructions when you try to build if you're badly misconfigured.
And, as a second quesion, why is there no MSVC++6sp4/STLport 4.0 support for the newer Python versions - by the way, there is already a Python v2.2.
The library works with Python 2.2.1 -Dave
I want to define operator * for a point type P.
template <class T>
class TPoint<T>
{
...
template <class U>
TPoint<U> operator *(U t) const;
...
};
template <class T>
template <class U>
TPoint<U> TPoint<T>::operator *(U t) const
{ return TPoint<U>((U)x()/t, (U)y()/t); }
but I only want to define this for types for which
boost::is_arithmetic<U> is true.
This is because
I also want to define operator * for an affine transformation
template
I know how to use type traits to enable compile time seperate procedures, but not how to use it to define a procedure for some type and not others.
One way (for member functions) is to use inheritance: add an "implementation
layer" that includes the member function or not depending on whether a trait
is true or not:
template
On Friday 03 May 2002 13:58, John Maddock wrote:
I know how to use type traits to enable compile time seperate procedures, but not how to use it to define a procedure for some type and not others.
check out http://groups.yahoo.com/group/Boost-Users/message/741 from Aleksey in teaching me how to combine MPL with the type_traits. BTW, the article of Andrei really helps (I had read it before but finally understood it really trying it muself) t
Hi Toon
Thanks for the lead::
http://www.cuj.com/experts/1810/alexandr.htm
I checked it out.
Alex wrote about 3 solutions for the problem
1. Specialize on meber function argument type (e.g., add
IntToType
On Friday 03 May 2002 13:58, John Maddock wrote:
I know how to use type traits to enable compile time seperate procedures, but not how to use it to define a procedure for some type and not others.
check out http://groups.yahoo.com/group/Boost-Users/message/741
from Aleksey in teaching me how to combine MPL with the type_traits. BTW, the article of Andrei really helps (I had read it before but finally understood it really trying it muself)
t
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[Non-text portions of this message have been removed]
Thanks. Code is below. Member operator *() branches to a template functor which specializes for arithmetic type, and leaves the rest undefined. Later, the operator * still cannot be overloaded, but the as yet undefined cases of the template functor are available to be defined. So that is how the problem is solved. I didn't want to use inheritance as that could profoundly affect performance. (In the atual code, A is a point type and Z is an affine transformation type. I want to be able to write a * z0 * z1 * z3, etc.Otherwise I have to define Z * A and write z3 * (z2 * (z1*a))) to bring about the same computation.) [I also wanted to key the return type using type traits, but the compiler complained about invalid template argument list, but that's another story]. Craig Hicks John Maddock wrote:
I know how to use type traits to enable compile time seperate procedures, but not how to use it to define a procedure for some type and not others.
One way (for member functions) is to use inheritance: add an "implementation layer" that includes the member function or not depending on whether a trait is true or not:
template
struct mybase { // details T operator*(); }; template
struct mybase { // details }; template <class T> struct mine : public mybase
{ // details }; Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
#include <iostream>
#include "boost\type_traits.hpp"
///////////////////////////////////////////////////////////////////
template <class T>
struct A
{
T i;
template <class U>
A<T>
operator * (const U& u) const;
};
template
participants (5)
-
Albrecht Fritzsche
-
David Abrahams
-
hicks
-
John Maddock
-
Toon Knapen