Remove c++17 dependency

This commit is contained in:
Luis Ángel San Martín
2019-09-23 19:55:00 +02:00
committed by Luis Ángel San Martín
parent 2d3888b4b4
commit 4990093e3d
3 changed files with 7 additions and 11 deletions

View File

@ -68,10 +68,10 @@ private:
bool isEof() const;
void advance();
template<typename First, typename... T>
static bool isIn(First &&first, T &&... t)
template<typename T>
static bool isIn(const T &e, const std::list<T> &v)
{
return ((first == t) || ...);
return std::find(v.begin(), v.end(), e) != v.end();
}
enum class FieldType { unknown,