Search code examples
c++regexboostboost-xpressive

How to use boost.xpressive without entire boost?


I'm trying to use regular expression in VC 2008, however I can not use boost library (or at least the entire boost library).

I've seen the files in boost.xpressive are using files in other boost directories.

As a curiosity, this tutorial from boost.xpressive provided a way to download xpressive.zip from a link, which is no longer available.

I'm assuming the xpressive.zip contains the minimum dependencies of xpressive.

Where can I get the "minimum portable boost.xpressive"?


Solution

  • In my boost root I executed

    ./b2 tools/bcp
    mkdir /tmp/XPRESSIVE
    bcp --boost=$PWD xpressive /tmp/XPRESSIVE/
    

    This resulted in a work tree of 29M (compared to ~542M of boost 1_60_0).

    It includes about 25% of all boost headers.

    It does include the library part of Boost Regex. You're probably going to have to include that (I don't know whether it's optional if you only use static regular expressions)