mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed C++11 bulid errors
This commit is contained in:
parent
e7b4570841
commit
13b8a46e90
16
peglib.h
16
peglib.h
@ -2530,9 +2530,11 @@ inline void DetectLeftRecursion::visit(Reference& ope) {
|
||||
}
|
||||
|
||||
inline void HasEmptyElement::visit(Reference& ope) {
|
||||
auto it = std::find_if(refs_.begin(), refs_.end(), [&](const auto& ref) {
|
||||
return ope.name_ == ref.second;
|
||||
});
|
||||
auto it = std::find_if(refs_.begin(), refs_.end(),
|
||||
[&](const std::pair<const char*, std::string>& ref) {
|
||||
return ope.name_ == ref.second;
|
||||
}
|
||||
);
|
||||
if (it != refs_.end()) {
|
||||
return;
|
||||
}
|
||||
@ -2545,9 +2547,11 @@ inline void HasEmptyElement::visit(Reference& ope) {
|
||||
}
|
||||
|
||||
inline void DetectInfiniteLoop::visit(Reference& ope) {
|
||||
auto it = std::find_if(refs_.begin(), refs_.end(), [&](const auto& ref) {
|
||||
return ope.name_ == ref.second;
|
||||
});
|
||||
auto it = std::find_if(refs_.begin(), refs_.end(),
|
||||
[&](const std::pair<const char*, std::string>& ref) {
|
||||
return ope.name_ == ref.second;
|
||||
}
|
||||
);
|
||||
if (it != refs_.end()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
pl0: pl0.cc ../peglib.h
|
||||
clang++ -std=c++14 -g -O0 pl0.cc `llvm-config --cxxflags --ldflags --system-libs --libs` -I.. -o pl0
|
||||
clang++ -std=c++11 -g -O0 pl0.cc `llvm-config --cxxflags --ldflags --system-libs --libs` -I.. -o pl0
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// pl0.cc - PL/0 language (https://en.wikipedia.org/wiki/PL/0)
|
||||
//
|
||||
// Copyright (c) 2018 Yuji Hirose. All rights reserved.
|
||||
// Copyright (c) 2020 Yuji Hirose. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user