[Concept Checking] function_requires

Hi all, as far as I understand http://www.boost.org/doc/libs/1_48_0/libs/concept_check/reference.htm#deprec..., function_requires() is deprecated. However, the documentation does not mention very clearly how to replace it. Is the BOOST_CONCEPT_ASSERT macro the replacement? E.g., does function_requires< VertexListGraphConcept<Graph> >(); now become BOOST_CONCEPT_ASSERT((VertexListGraphConcept<Graph>)); function_requires still appears in a lot of test cases of the Graph library. So if it is that easy to change, I would hand in a patch. Best regards, Jens

on Sun Dec 18 2011, Jens Müller <blog-AT-tessarakt.de> wrote:
Hi all,
as far as I understand http://www.boost.org/doc/libs/1_48_0/libs/concept_check/reference.htm#deprec..., function_requires() is deprecated.
However, the documentation does not mention very clearly how to replace it. Is the BOOST_CONCEPT_ASSERT macro the replacement? E.g., does
function_requires< VertexListGraphConcept<Graph> >();
now become
BOOST_CONCEPT_ASSERT((VertexListGraphConcept<Graph>));
Yes.
function_requires still appears in a lot of test cases of the Graph library. So if it is that easy to change, I would hand in a patch.
I suggest you also patch the concept_check docs to clarify this :-) -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On 18.12.2011 14:07, Dave Abrahams wrote:
function_requires still appears in a lot of test cases of the Graph
library. So if it is that easy to change, I would hand in a patch. I suggest you also patch the concept_check docs to clarify this:-)
That would be http://svn.boost.org/svn/boost/trunk/libs/concept_check/reference.htm then. Is it by intent that the .htm files are not in sub-directory, however named? - Jens

on Sun Dec 18 2011, Jens Müller <blog-AT-tessarakt.de> wrote:
On 18.12.2011 14:07, Dave Abrahams wrote:
function_requires still appears in a lot of test cases of the Graph
library. So if it is that easy to change, I would hand in a patch. I suggest you also patch the concept_check docs to clarify this:-)
That would be http://svn.boost.org/svn/boost/trunk/libs/concept_check/reference.htm then.
Is it by intent that the .htm files are not in sub-directory, however named?
This is one of the oldest libraries, and I didn't write it originally. I'm not sure I could tell you much about intent. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On 18.12.2011 14:07, Dave Abrahams wrote:
function_requires still appears in a lot of test cases of the Graph
library. So if it is that easy to change, I would hand in a patch. I suggest you also patch the concept_check docs to clarify this:-)
Patch is at https://svn.boost.org/trac/boost/ticket/6293 Regards, Jens

On 18.12.2011 21:43, Jens Müller wrote:
On 18.12.2011 14:07, Dave Abrahams wrote:
function_requires still appears in a lot of test cases of the Graph
library. So if it is that easy to change, I would hand in a patch. I suggest you also patch the concept_check docs to clarify this:-)
Patch is at https://svn.boost.org/trac/boost/ticket/6293
OK, there still is a problem in it, and I don't find the reason at the moment (see ticket). - Jens

On 18.12.2011 13:08, Jens Müller wrote:
function_requires still appears in a lot of test cases of the Graph library. So if it is that easy to change, I would hand in a patch.
Should it be BOOST_CONCEPT_ASSERT((MutableEdgeListGraphConcept<Graph>)); or BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); - Jens

on Sun Dec 18 2011, Jens Müller <blog-AT-tessarakt.de> wrote:
On 18.12.2011 13:08, Jens Müller wrote:
function_requires still appears in a lot of test cases of the Graph library. So if it is that easy to change, I would hand in a patch.
Should it be
BOOST_CONCEPT_ASSERT((MutableEdgeListGraphConcept<Graph>));
or
BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> ));
Take your pick. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (2)
-
Dave Abrahams
-
Jens Müller