This was a mistake I made accidentally -- meant to have the function in the C++ file, not in the header.