I have a really short program written in boost::xpressive
#include <iostream>
#include <boost/xpressive/xpressive.hpp>
using namespace boost::xpressive;
int main()
{
std::string hello( "hello world!" );
sregex rex = sregex::compile( "(\\w+) (\\w+)!" );
smatch what;
if( regex_match( hello, what, rex ) )
{
std::cout << what[0] << '\n'; // whole match
std::cout << what[1] << '\n'; // first capture
std::cout << what[2] << '\n'; // second capture
}
return 0;
}
It's the Xpressive "hello world". It takes significantly longer than an ordinary hello world to compile. I think it's because the xpressive.hpp file is so huge. Is there a way to pre-compile or pre-process the .hpp file so the compile will be much faster?