1

I am not an expert in boost, though I have used ublas extensively. Recently, my supervisor asked me to build boost regex for the gcc platform. My question is:

Why can't I use the regex as it is, like ublas?

Please give detailed answer.

  • if that is the only worry you have with boost::regex, consider yourself blessed my friend. –  Oct 23 '10 at 03:03
  • Similar if not duplicate: [Including Relevant Boost Libraries with C++ Source (Using Visual Studio)](http://stackoverflow.com/questions/145828/including-relevant-boost-libraries-with-c-source-using-visual-studio) – epochwolf Feb 09 '09 at 19:16

2 Answers2

5

I'm assuming that by "can't use the regex as it is" you mean "without having to build it seperately".

Short answer: uBLAS is "header-only" (http://www.boost.org/doc/libs?view=filtered_header-only), and Regex is not.

A "header-only" library's implementation entirely resides in header (.hpp) files. To use it, one only has to #include these headers.

A "non-header-only" ("normal"?) library has headers declaring the library's interface, but the implementation is in .cpp files, which are built seperately and then linked into the final executable. In Boost, the .cpp files are normally in boost/libs/<library-name>/src.

Éric Malenfant
  • 13,938
  • 1
  • 40
  • 42
0

I have worked something using regular expressing. Because I am not aware of it well, I had to find something about it(web-surfing and reading a few book).

Not only boost library but also standard library includes regular expression.

If you mind using standard library, I would like to recommend a few book(C++ Primer fifth edition by Stanley B. Lippman, Josée Lajoie and Barbara E. Moo). You can find regular expression in standard library and familiarize yourself with it.

blank_popup
  • 261
  • 1
  • 2
  • 13