|
Boost : |
Subject: Re: [boost] [concept] EqualityComparable metafunction
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-05 21:29:02
on Mon Sep 05 2011, Allan Johns <allan.johns-AT-drdstudios.com> wrote:
> boost aside, this article is a great working example of a hand-rolled SFINAE
> approach
>
> http://www.martinecker.com/wiki/index.php?title=Detecting_the_Existence_of_Operators_at_Compile-Time
Good article. That solution breaks if the operator== returns void. You
can work around that with techniques shown in
boost/detail/is_incrementable.hpp, but even that technique can break
down if there's a user-defined comma operator. They all break if
operator== is private.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk