| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef GLOBALS_H |
| 4 | #define GLOBALS_H |
| 5 | |
| 6 | class Globals { |
| 7 | public: |
| 8 | template <typename T, typename U> |
| 9 | static bool hasFlag(T value, U flag); |
| 10 | |
| 11 | private: |
| 12 | Globals(); |
| 13 | }; |
| 14 | |
| 15 | template <typename T, typename U> |
| 16 | inline bool Globals::hasFlag(T value, U flag) { |
| 17 | return (int(value) & int(flag)) == int(flag); |
| 18 | } |
| 19 | |
| 20 | #endif // GLOBALS_H |