this should be:

const glm::vec3& getLastRotationRates() const { return _lastRotationRates; };

Notice the return value is a reference.