Merge pull request #40 from rkollataj/clang_3.5.2_fix

Backporting "undefined reference to peg::enabler"
This commit is contained in:
yhirose 2018-07-22 06:57:02 -04:00 committed by GitHub
commit beaa0346ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,8 +41,8 @@
namespace peg {
#if __clang__ == 1 && __clang_major__ == 5 && __clang_minor__ == 0 && __clang_patchlevel__ == 0
static void* enabler = nullptr; // workaround for Clang 5.0.0
#if __clang__ == 1 && __clang_major__ <= 5
static void* enabler = nullptr; // workaround for Clang version <= 5.0.0
#else
extern void* enabler;
#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*>();
switch (sv.choice()) {