my quick look at the boost implementation leads me to think that they are not first comparing .size().