Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Macro BOOST_PROTO_EXTENDS

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Reference

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

PrevUpHomeNext

Macro BOOST_PROTO_EXTENDS

BOOST_PROTO_EXTENDS — For creating expression wrappers that add behaviors to a Proto expression template, like proto::extends<>, but while retaining POD-ness of the expression wrapper.

Synopsis

// In header: <boost/proto/extends.hpp>
BOOST_PROTO_EXTENDS(Expr, Derived, Domain)

Description

Эквивалентно:

BOOST_PROTO_BASIC_EXTENDS(Expr, Derived, Domain)
BOOST_PROTO_EXTENDS_ASSIGN()
BOOST_PROTO_EXTENDS_SUBSCRIPT()
BOOST_PROTO_EXTENDS_FUNCTION()

Если параметр<Domain>зависим, вы можете указать его как<typename Domain>, как в<BOOST_PROTO_EXTENDS(Expr, Derived, typename Domain)>.

Пример:

template< class Expr >
struct my_expr;
struct my_domain
  : proto::domain< proto::pod_generator< my_expr > >
{};
template< class Expr >
struct my_expr
{
    // OK, this makes my_expr<> a valid Proto expression extension.
    // my_expr<> has overloaded assignment, subscript,
    // and function call operators that build expression templates.
    BOOST_PROTO_EXTENDS(Expr, my_expr, my_domain)
};
// OK, my_expr<> is POD, so this is statically initialized:
my_expr< proto::terminal<int>::type > const _1 = {{1}};


PrevUpHomeNext

Статья Macro BOOST_PROTO_EXTENDS раздела The Boost C++ Libraries BoostBook Documentation Subset Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 01:01:30/0.0049610137939453/1