Say I have the following code:
class.h
#ifndef CLASS_H
#define CLASS_H
class Class
{
private:
std::regex* regex;
};
#endif
class.cpp
#include <regex>
#include "class.h"
// ...
Compiling this results in the following error:
error: "regex" in namespace "std" does not name a type
std::regex* regex;
^~~~~
I am however able to use the std::regex library in any other manner? Running on GCC 6.1.1. Also tried to compile explicitly with the -std=C++11 flag.