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 for the latest Boost documentation.
PrevUpHomeNext

Struct template when<Grammar, Fun *>

boost::proto::when<Grammar, Fun *> — A specialization that treats function pointer Transforms as if they were function type Transforms.

Synopsis

// In header: <boost/proto/transform/when.hpp>

template<typename Grammar, typename Fun> 
struct when<Grammar, Fun *> :  proto::when< Grammar, Fun > {
};

Description

This specialization requires that Fun is actually a function type.

This specialization is required for nested transforms such as proto::when<G, T0(T1(_))>. In C++, functions that are used as parameters to other functions automatically decay to funtion pointer types. In other words, the type T0(T1(_)) is indistinguishable from T0(T1(*)(_)). This specialization is required to handle these nested function pointer type transforms properly.


PrevUpHomeNext