Boost logo

Boost Users :

Subject: Re: [Boost-users] template concept question
From: Alan Tennant (alan2here_at_[hidden])
Date: 2010-03-10 12:02:31


I presume introspection is more portable.

I'm getting the error in forward1.hpp "cannot open include file:
'boost/introspection/detail/object_call_spec.hpp'". This file does not
appear to be on the sandbox.

On 9 March 2010 13:29, Igor R <boost.lists_at_[hidden]> wrote:

> > Can I ask inside a template function if a member exists on a parameter of
> > the function.
> >
> > For example.
> >
> > template <typename T>
> > void func(T in)
> > {
> > exists(in, foo);
> > }
> >
> > Where the "exists" line would return true if "in" had a member "foo"
> > otherwise false.
>
> Note, however, that "introspection" libarary cannot detect an inherited
> member.
> If you use MSVC and don't need a portable code, you can use
> __if_exists statement:
> http://msdn.microsoft.com/en-us/library/x7wy9xh3(VS.80).aspx
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net