Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2137: BOOST_CONCEPT_REQUIRES fails on g++
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-07-22 17:26:05
#2137: BOOST_CONCEPT_REQUIRES fails on g++
-----------------------------------+----------------------------------------
Reporter: john.femiani_at_[hidden] | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: None
Version: Boost 1.35.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------+----------------------------------------
Comment(by dave):
The library is doing what it's supposed to do on GCC. In general, it
isn't possible to check for concept conformance without causing an error,
so BOOST_CONCEPT_REQUIRES is supposed to cause an error if conformance
fails. It doesn't try to do SFINAE, because, in general, SFINAE is not
possible.
I probably should have put this in the docs, but I didn't quite realize it
until now: an overloaded function that uses BOOST_CONCEPT_REQUIRES should
only require the least-refined concept in the overload set. Otherwise the
concept check will cause compilation to fail if a more-refined model is
passed. If you want to check for a more refined model, you need to use
BOOST_CONCEPT_ASSERT((...)) in the function body.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2137#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC