Skip to content

Commit 8baea47

Browse files
author
Hana Dusíková
committed
updated readme
1 parent fea2b16 commit 8baea47

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,20 @@ for (auto match: ctre::range(input,"[0-9]++"_ctre)) {
9999

100100
* clang 5.0+
101101
* gcc 7.2+
102+
* MSVC 15.8.8+ (experimental, without string_literal support)
102103

103104
Compiler must support N3599 extension (as GNU extension in gcc and clang) or C++20 class NTTP (P0732).
105+
106+
### MSVC
107+
108+
Because current MSVC doesn't support custom templated string literals or NTTP, you need to use workaround:
109+
110+
```
111+
static constexpr inline auto pattern = ctll::basic_fixed_string{ "h.*" };
112+
113+
constexpr auto match(std::string_view sv) noexcept {
114+
return ctre::re<pattern>().match(sv);
115+
}
116+
```
117+
118+
(this is tested in MSVC 15.8.8)

0 commit comments

Comments
 (0)