Build with XCode6-beta 2: use memoize2 functor