StdUtils.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. // setup of low level library includes in this file.
  10. // if not defined -> fallback to std
  11. #include <cassert>
  12. #include <cctype>
  13. #include <cfloat>
  14. #include <algorithm>
  15. #include <array>
  16. #include <functional>
  17. #include <iostream>
  18. #include <map>
  19. #include <regex>
  20. #include <set>
  21. #include <stack>
  22. #include <string_view>
  23. #include <tuple>
  24. #include <unordered_map>
  25. #include <unordered_set>
  26. #include <variant>
  27. #include <optional>
  28. template <typename C, typename... T>
  29. using is_invocable = std::is_invocable<C, T...>;
  30. template <typename C, typename... T>
  31. using invoke_result_t = std::invoke_result_t<C, T...>;
  32. inline constexpr auto none = std::nullopt;
  33. namespace AZ
  34. {
  35. using std::get;
  36. using std::holds_alternative;
  37. using std::monostate;
  38. using std::variant;
  39. using std::optional;
  40. // Configure basic symbols so we can use them unqualified -> easy to change to AzStd without big refactorings.
  41. using std::enable_if_t;
  42. using std::is_same_v;
  43. using std::count;
  44. using std::exception;
  45. using std::pair;
  46. using std::tuple;
  47. using std::string;
  48. using std::string_view;
  49. using std::array;
  50. using std::map;
  51. using std::set;
  52. using std::stack;
  53. using std::unordered_map;
  54. using std::unordered_set;
  55. using std::vector;
  56. template <typename SetType>
  57. void SetMerge(SetType& dest, SetType& src)
  58. {
  59. dest.merge(src);
  60. }
  61. }