3 ms·
typically, c++ library functions do not use a possibly expensive check if the caller could have performed it themselves, should they have wished to. in this cas
by zabzonk 4y ago
typically, c++ library functions do not use a possibly expensive check if the caller could have performed it themselves, should they have wished to. in this case, the caller could have tested if the container was empty before calling the function.