Closed moritz-geier closed 7 months ago
The msvc support is the main time sink in this project. It takes 80% of the time to come up with workarounds just to make things compile. Not sure why the main branch is reporting no issues on github actions in msvc, maybe the compiler is different.
What exactly are you trying to build here?
This is my current code. The error is indicated by the parser
object. The goal is to create a parser to parse simple conditions like (5>3)&10>8.8
. I tried to implement it on the release branch 1.3.7 but there my regex for floating point ("[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?"
) numbers got me into some trouble, thus i wanted to try out the main branch. The code below is just a simple proof of concept, but it still fails.
///////////////////////////////////////////////////////////////////////////
static constexpr ctpg::nterm<bool> conditionExpression{"condition"};
static constexpr char integerPattern[] = "[-+]?[0-9]+";
static constexpr ctpg::regex_term<integerPattern> integerValue{"integer"};
static constexpr ctpg::char_term trueLiteral{'t'};
static constexpr ctpg::char_term falseLiteral{'f'};
///////////////////////////////////////////////////////////////////////////
static constexpr auto root = conditionExpression;
///////////////////////////////////////////////////////////////////////////
static constexpr auto terminals = ctpg::terms(
integerValue,
't',
'f'
);
///////////////////////////////////////////////////////////////////////////
static constexpr auto nonTerminals = ctpg::nterms(
conditionExpression
);
///////////////////////////////////////////////////////////////////////////
static constexpr ctpg::parser parser{
root,
terminals,
nonTerminals,
rules(
conditionExpression(trueLiteral) >=
[](const auto&) { return true; },
conditionExpression(falseLiteral) >=
[](const auto&) { return false; }
)
};
Oh, i tried to compile it with GCC, and it says:
ctpg.hpp:2380:42: error: C++20 says that these are ambiguous, even though the second is reversed: [-Werror]
[build] 2380 | if (states[i].kernel == kernel)
[build] | ~~~~~~~~~~~~~~~~~^~~~~~~~~
Oh, you are supposed to use c++17. I did not work on the project quite a while, making it c++20 is my top priority though. I am aware there are issues with compilation using c++20
Okay thank you, are there plans to upgrade to C++20 at any time?
Sure, but keep in mind I'm just another Nebraska dude: https://xkcd.com/2347/
Hello,
I'm trying to build the main branch with MSVC 19.39 on Windows 11. But the build is resulting in the following error.
I also tried building the release 1.3.7 which worked without problems.