Why is splicing an entire list or a range linear for std::forward_list?
问题 Splicing a range from one list to another can be accomplished in constant time, at the expense of making size() 's complexity linear. C++11 has changed that in case of std::list by requiring size() to be constant time. This broke, for example, gcc's implementation, see [C++0x] std::list::size complexity. Apart from the range splice() , is there any other reason why size() could not be made constant time in the earlier, C++03 conforming std::list implementations? Why is splicing an entire list