Skip to content

Commit e0ac766

Browse files
committed
Tiny fixes to help MSVC and Clang get closer to building
I haven't been able to get far yet in diagnosing the UFCS perf issue, but in the meantime here are a couple of small tweaks that help MSVC and Clang build this branch...
1 parent 8bdd23d commit e0ac766

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/cpp2regex.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ template<typename Error_out> class regex_parser;
211211
#include <set>
212212

213213
template<typename matcher_wrapper, typename Iter, typename CharT>
214-
using matcher_wrapper_type = typename matcher_wrapper::wrap<Iter, CharT>;
214+
using matcher_wrapper_type = typename matcher_wrapper::template wrap<Iter, CharT>;
215215

216216
#line 19 "regex.h2"
217217
namespace cpp2 {
@@ -1362,7 +1362,7 @@ template<typename CharT, typename matcher_wrapper> class regular_expression {
13621362
#line 2368 "regex.h2"
13631363
public: template<typename Iter> using matcher = matcher_wrapper_type<matcher_wrapper,Iter,CharT>;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
13641364
public: template<typename Iter> using context = matcher<Iter>::context;
1365-
1365+
13661366
// TODO: Named multiple return has problems with templates.
13671367
public: template<typename Iter> class search_return {
13681368
public: bool matched;
@@ -2228,8 +2228,8 @@ template<typename Func> [[nodiscard]] auto make_on_return(Func const& func) -> a
22282228
auto is_negative {false};
22292229
auto is_reset {false};
22302230

2231-
auto add {0};
2232-
auto remove {0};
2231+
// add := 0;
2232+
// remove := 0;
22332233

22342234
auto apply {[&, _1 = (&is_negative), _2 = (&parser_modifiers)](cpp2::impl::in<expression_flags> flag) mutable -> void{
22352235
if (*cpp2::impl::assert_not_null(_1)) {

source/regex.h2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <set>
1515

1616
template<typename matcher_wrapper, typename Iter, typename CharT>
17-
using matcher_wrapper_type = typename matcher_wrapper::wrap<Iter, CharT>;
17+
using matcher_wrapper_type = typename matcher_wrapper::template wrap<Iter, CharT>;
1818

1919
cpp2: namespace = {
2020

@@ -696,8 +696,8 @@ parse_context: type = {
696696
is_negative := false;
697697
is_reset := false;
698698

699-
add := 0;
700-
remove := 0;
699+
// add := 0;
700+
// remove := 0;
701701

702702
apply := :(flag: expression_flags) = {
703703
if is_negative&$* {

0 commit comments

Comments
 (0)