get_unexpected: Add function ref-qualifier.