funny... the inline works. the cpp had some mysterious problems with the stringstream and some redefinition error. *.inc should be added to cmake or renamed to *.inl.