[C++-sig] Re: IntWrapper.hpp in indexing_suite

Raoul Gough RaoulGough at yahoo.co.uk
Sun Oct 12 19:05:30 CEST 2003


"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 11 Oct 2003 at 19:45, Niall Douglas wrote:
>
> Fixed it!
>
> The below works lovely, and my thanks for the advice. The problem was 
> the boost::noncopyable in the MyListCArray declaration.

I wouldn't have guessed that it had to do with the noncopyable, so I
don't think I actually helped out at all. Still, a good result in the
end :-)

>
> Ok, next question: How do you determine the return type of a function 
> pointer? It must be possible as bpl determines return type in def() - 
> get_signature() from signature.hpp looked hopeful, but it appears to 
> be a run-time not compile-time function.
>
> To clarify:
>
> std::string *foo();
>
> typedef result_of<&foo>::value return_type;
>
> .... and return_type is std::string *.

Not sure if this is how Boost.Python does it, but the Boost
type_traits library would be sufficient for what you described
above. See the "Function Traits" section of libs/type_traits/index.htm
for details.

-- 
Raoul Gough.
(setq dabbrev-case-fold-search nil)





More information about the Cplusplus-sig mailing list