Rewrote with Boost.MPL