aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/utility.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65fee81..3c526f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(CodepointIterator)
set(
CMAKE_CXX_FLAGS
- "-std=c++11 -W -Wall -Wextra -Winline -pedantic"
+ "-std=c++14 -W -Wall -Wextra -Winline -pedantic"
)
include_directories(
diff --git a/src/utility.h b/src/utility.h
index 75811f5..56bcfea 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -7,17 +7,17 @@ namespace UTF8 {
namespace dtl {
enum class CodeUnitType : std::uint8_t {
- CONTINUATION = (128 >> 0), // 10000000
- LEADING = (128 >> 1), // 01000000
- THREE = (128 >> 2), // 00100000
- FOUR = (128 >> 3), // 00010000
+ CONTINUATION = 0b10000000,
+ LEADING = 0b01000000,
+ THREE = 0b00100000,
+ FOUR = 0b00010000
};
enum class CodePoint : std::uint8_t {
- CONTINUATION = (UINT8_MAX >> 2), // 00111111
- TWO = (UINT8_MAX >> 3), // 00011111
- THREE = (UINT8_MAX >> 4), // 00001111
- FOUR = (UINT8_MAX >> 5), // 00000111
+ CONTINUATION = 0b00111111,
+ TWO = 0b00011111,
+ THREE = 0b00001111,
+ FOUR = 0b00000111
};
inline bool match(const std::uint8_t unit, const CodeUnitType type) {