mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2025-11-23 21:57:39 +00:00
Backporting "undefined reference to peg::enabler" fix to all versions older than 5.0.0; Fix tests to compile with clang 3.5.
Signed-off-by: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com>
This commit is contained in:
parent
9c3da8d6af
commit
ba6efeae90
6
peglib.h
6
peglib.h
@ -41,8 +41,8 @@
|
|||||||
|
|
||||||
namespace peg {
|
namespace peg {
|
||||||
|
|
||||||
#if __clang__ == 1 && __clang_major__ == 5 && __clang_minor__ == 0 && __clang_patchlevel__ == 0
|
#if __clang__ == 1 && __clang_major__ <= 5
|
||||||
static void* enabler = nullptr; // workaround for Clang 5.0.0
|
static void* enabler = nullptr; // workaround for Clang version <= 5.0.0
|
||||||
#else
|
#else
|
||||||
extern void* enabler;
|
extern void* enabler;
|
||||||
#endif
|
#endif
|
||||||
@ -2076,7 +2076,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
g["Primary"] = [&](const SemanticValues& sv, any& dt) {
|
g["Primary"] = [&](const SemanticValues& sv, any& dt) -> std::shared_ptr<Ope> {
|
||||||
Data& data = *dt.get<Data*>();
|
Data& data = *dt.get<Data*>();
|
||||||
|
|
||||||
switch (sv.choice()) {
|
switch (sv.choice()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user