diff options
Diffstat (limited to 'src/Geometry.h')
-rw-r--r-- | src/Geometry.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index cee76498e..35702a468 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -13,6 +13,12 @@ namespace Scintilla { typedef float XYPOSITION; typedef double XYACCUMULATOR; +// Test if an enum class value has the bit flag(s) of test set. +template <typename T> +constexpr bool FlagSet(T value, T test) { + return (static_cast<int>(value) & static_cast<int>(test)) == static_cast<int>(test); +} + /** * A geometric point class. * Point is similar to the Win32 POINT and GTK+ GdkPoint types. |