$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] template concept question
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-08 21:35:27
AMDG
Alan Tennant wrote:
> I was reading about boosts concepts and I thought.
>
> 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.
>
There's an introspection library in the sandbox that
does this, I think. http://svn.boost.org/svn/boost/sandbox/introspection
In Christ,
Steven Watanabe