set.h 614 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #pragma once
  8. #include <better/better.h>
  9. #ifdef BETTER_USE_FOLLY_CONTAINERS
  10. #include <folly/container/F14Set.h>
  11. #else
  12. #include <unordered_set>
  13. #endif
  14. namespace facebook {
  15. namespace better {
  16. #ifdef BETTER_USE_FOLLY_CONTAINERS
  17. template <typename... Ts>
  18. using set = folly::F14FastSet<Ts...>;
  19. #else
  20. template <typename... Ts>
  21. using set = std::unordered_set<Ts...>;
  22. #endif
  23. } // namespace better
  24. } // namespace facebook