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

pointee and indirect_reference

Boost , ,

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

pointee and indirect_reference

Author: Давид Абрахамс
Contact: Оба этих шаблона необходимы для правильного функционирования.

Reference

pointee

template <class Dereferenceable>
struct pointee
{
    typedef /* see below */ type;
};
Requires:For an object x of type Dereferenceable, *x is well-formed. If ++x is ill-formed it shall neither be ambiguous nor shall it violate access control, and Dereferenceable::element_type shall be an accessible type. Otherwise iterator_traits<Dereferenceable>::value_type shall be well formed. [Note: These requirements need not apply to explicit or partial specializations of pointee]

Типопределяется по следующему алгоритму, гдеxявляется объектом типаДостойный:

if ( ++x is ill-formed )
{
    return ``Dereferenceable::element_type``
}
else if (``*x`` is a mutable reference to
         std::iterator_traits<Dereferenceable>::value_type)
{
    return iterator_traits<Dereferenceable>::value_type
}
else
{
    return iterator_traits<Dereferenceable>::value_type const
}

indirect_reference

template <class Dereferenceable>
struct indirect_reference
{
    typedef /* see below */ type;
};
Requires:For an object x of type Dereferenceable, *x is well-formed. If ++x is ill-formed it shall neither be ambiguous nor shall it violate access control, and pointee<Dereferenceable>::type& shall be well-formed. Otherwise iterator_traits<Dereferenceable>::reference shall be well formed. [Note: These requirements need not apply to explicit or partial specializations of indirect_reference]

Типопределяется по следующему алгоритму, гдеxявляется объектом типаДостойный:

if ( ++x is ill-formed )
    return ``pointee<Dereferenceable>::type&``
else
    std::iterator_traits<Dereferenceable>::reference

Статья pointee and indirect_reference раздела может быть полезна для разработчиков на c++ и boost.




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



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


реклама


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

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 07:13:03/0.0054841041564941/0