Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Macro BOOST_TYPE_ERASURE_FREE

BOOST_TYPE_ERASURE_FREE — Defines a primitive concept for a free function.

Synopsis

// In header: <boost/type_erasure/free.hpp>

BOOST_TYPE_ERASURE_FREE(concept_name, function_name)

Description

The declaration of the concept is

template<class Sig>
struct concept_name;

where Sig is a function type giving the signature of the function.

This macro can only be used at namespace scope.

Example:

BOOST_TYPE_ERASURE_FREE(to_string)
typedef has_to_string<std::string(_self const&)> to_string_concept;

In C++03, the macro can only be used in the global namespace and is defined as:

#define BOOST_TYPE_ERASURE_FREE(qualified_name, function_name, N)

Example:

BOOST_TYPE_ERASURE_FREE((boost)(has_to_string), to_string, 1)

For backwards compatibility, this form is always accepted.

Parameters:

concept_name

is the name of the concept to declare. If it is omitted it defaults to has_ ## function_name

function_name

is the name of the function.


PrevUpHomeNext