proxygen
folly::unsorted_t Struct Reference

#include <Utility.h>

Detailed Description

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 ... } }

Definition at line 331 of file Utility.h.


The documentation for this struct was generated from the following file: