hlib is templated