This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: list::_M_check_equal_allocators throws


On 17 September 2013 14:57, Marc Glisse wrote:
> Hello,
>
> I noticed that std::list::_M_check_equal_allocators throws an exception when
> the allocators should be equal but they are not. This prevents from marking
> splice noexcept (well, technically we still could, but...).
>
> Debug mode, when it detects an error, prints a diagnostic and aborts. Should
> this list check do the same? It looks more like a logic error than a runtime
> error to me.

I agree that std::logic_error would have made more sense than
std::runtime_error, but as it's undefined behaviour anyway I'd be
happy to just terminate there too.  I don't have a strong preference.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]