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

The MPL Reference Manual: erase_key

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

Front Page / Sequences / Intrinsic Metafunctions / erase_key

erase_key

Synopsis

template<
      typename AssocSeq
    , typename Key
    >
struct erase_key
{
    typedef unspecified type;
};

Description

Erases elements associated with the key Key in the Extensible Associative Sequence AssocSeq.

Parameters

Parameter Requirement Description
AssocSeq Extensible Associative Sequence Последовательность для удаления элементов.
Кей Любой тип Ключ для элементов, подлежащих удалению.

Expression semantics

Для любого Extensible Associative Sequence s, и произвольного типа key:

typedef erase_key<s,key>::type r;
Return type:Extensible Associative Sequence.
Semantics:r is concept-identical and equivalent to s except that has_key<r,k>::value == false.
Postcondition:size<r>::value == size<s>::value - 1.

Complexity

Амортированное постоянное время.

Example

typedef map< pair<int,unsigned>, pair<char,long> > m;
typedef erase_key<m,char>::type m1;
BOOST_MPL_ASSERT_RELATION( size<m1>::type::value, ==, 1 );
BOOST_MPL_ASSERT(( is_same< at<m1,char>::type,void_ > ));
BOOST_MPL_ASSERT(( is_same< at<m1,int>::type,unsigned > ));

Статья The MPL Reference Manual: erase_key раздела может быть полезна для разработчиков на c++ и boost.




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



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


реклама


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

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