Revert change that broke using libantlr4-runtime4.9 with C++17 Upstream commit 254b144b creeated a different ABI for C++17, but it is not even possible to build antlr4-cpp-runtime for this ABI. . The proper fix would be upgrading to 4.9.2 where two commits in March 2021 fixed this issue: https://github.com/antlr/antlr4/commits/master/runtime/Cpp/runtime/src/ANTLRInputStream.h . The upstream fix changes ABI, do the simple fix instead that does not offer a different ABI the library cannot even be built for.