List Info

Thread: Re: std::tr1::shared_ptr and C++ Singletons




Re: std::tr1::shared_ptr and C++ Singletons
country flaguser name
Poland
2007-03-16 08:03:06
> As I said on IRC: I don't think this is 'correct', as
boost and tr1 are two
> disjunct sets of APIs. I don't know the details of how
the converters work,
> but I'd guess just declaring the above get_pointer()
function so it makes
> its way into the overload set seen when the compiler
instantiates the
> conerter harness should be enough.
Seems you were at least partially right. I did some addition
research and 
testcases follow.

> If it isn't, a (simple, minimal) test case may be a
good idea. 
Here we go: 
testcase1 - [1] - couldn't be any simpler - compiles just
fine
testcase2 - [2] - putting foo in the blah namespace breaks -
[3]
testcase3 - [4] - workaround for testcase2, notice that
including the 
boost/python.hpp before the template definition or not
putting the template 
in the boost namespace breaks it.

[1] - http://dev.gentooexperimental.org/~peper/boost/testca
se1.cc
[2] - http://dev.gentooexperimental.org/~peper/boost/testca
se2.cc
[3] - http://dev.gentooexperimental.org/~peper/boost
/testcase2_error.txt
[4] - http://dev.gentooexperimental.org/~peper/boost/testca
se3.cc

boost 1.33.1 and gcc 4.1.2.

-- 
Best Regards,
Piotr Jaroszynski
_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )