Search code examples
c++boostmetaprogrammingfunctorc++-loki

C++: Are YOU using Loki or Boost for functors?


I've been reading Alexandrescu's book, Modern C++ design , and I've been quite impressed by the techniques he uses, so I wanted to add Loki library to my application.

However, after further investigation, I saw that boost, that I'm already using, provides a lot of similar functionality (not all though, I couldn't find a singleton in boost for example)

I was mostly interested in using loki because of the policy based design and the functors.

To me both, boost and loki have pros and cons. The main concern I have with loki is the poor documentation (the library isn't tied to the book anymore) but it seems to me that loki is more powerful and flexible than boost in some areas (I might be wrong on that one)

Before choosing to use boost or loki for functors and policies, I'd like to know the opinion of people who use them in real life.

Sometimes things look very good on paper but have some drawbacks when you use them for real:)


Solution

  • I'm using Boost in my whole C++ environnement like an extension to the Standard Library (with VC9 and VC10).

    I don't use it on all projects.

    I use it on personal projects (mostly games) where I got full control of what are the dependencies.

    I'm using boost::function in a big game project (with several other libraries from boost).

    Loki is good too but I didn't feel the need. I think the only part of the library I'm thinking of using is the Singleton but I'm using a custom one that is fine enough for the moment.