StringPiece shouldn't "fix" out-of-order iterators.
Previously, StringPiece would notice if the iterators supplied to its constructor were swapped and fix the string to a 0-length string.
This is dangerous because it might hide bugs and the additional checking slows down what should be an almost-free constructor.
This patch removes the silent fix and adds a debug assertion that the iterators are in order.
Review URL: https://codereview.chromium.org/1254093002
Cr-Commit-Position: refs/heads/master@{#340581}
2 files changed