$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2008-06-17 13:41:07
John Moeller wrote:
> Hello all,
>
> I am trying to make an "is_range" metafunction that (essentially) returns
> mpl::true_ when the template parameter is a range (as defined by the
> boost::range library).
>
> I can do this if I create a specialization for every "non-range" type currently
> specialized by the library (such as built-in arrays, char strings, etc.).
> However, I'd like to have is_range work for a user-defined range without the
> user *also* needing to specialize is_range.
Maybe try something like this:
Using techniques like that you should be able to generate a metafunction
that will check if an object instantiates a concept by checking all it's
public interface functions, types, etc...