proxygen
|
#include <Utility.h>
A generic tag type to indicate that some constructor or method accepts an unsorted container. Useful in contexts which might have some reason to assume a container to be sorted.
Example:
void takes_numbers(std::vector<int> alist) { takes_numbers(folly::unsorted, alist); }
void takes_numbers(folly::unsorted_t, std::vector<int> alist) { std::sort(alist.begin(), alist.end()); for (i : alist) { // some behavior which is defined and safe only when alist is sorted ... } }