Opened 16 years ago

Last modified 12 years ago

#816 closed Support Requests (fixed)

duplicat initial members -> erase_key postcond. fail — at Version 2

Reported by: cppljevans Owned by: Aleksey Gurtovoy
Milestone: Boost 1.46.0 Component: mpl
Version: None Severity: Problem
Keywords: Cc: agurtovoy@…

Description (last modified by Marshall Clow)

has_key<erase_key<set<T,T>,T>::type>type::value==true
in violation of Postcondition on
http://www.boost.org/libs/mpl/doc/refmanual/erase-key.html .

Change History (3)

comment:1 by cppljevans, 16 years ago

Logged In: YES 
user_id=24558
Originator: YES

The attached file has assoc_item template showing how to check for duplicates
using a boost concept template.  Although it can only be compiled with
Doug's variadic template compiler, the method used to check for duplicates
can, AFAICT, be used with the current m_item and s_item templates in
the current mpl library.  This is because the method used just
uses a slight variation of the static value_by_key which the
current mpl assoc containers already use. 
File Added: cons_inherit_check_test.cpp

comment:2 by Marshall Clow, 15 years ago

Component: Nonempl
Description: modified (diff)
Severity: Problem

by cppljevans@…, 13 years ago

Attachment: assoc_by_insert.cpp added

solution using superclass which is fold over insert op

Note: See TracTickets for help on using tickets.