8th edition BRB p. 16: "When you declare a charge, one or more of the models in your unit must be able to trace a line of sight to the enemy unit, and the target must lie at least partially within the charging unit's front arc." Furthermore, a " unit cannot declare an impossible charge."
So, to declare a legal charge, the target must lie at least partially in the front arc. Since this is a precondition to declaring a charge, that means you are allowed to check, because otherwise you might be declaring an illegal charge, which you are not allowed to do.
The rule as such has not changed between 6-8 the edition, although the wording has. Edit: However, in previous editions, you were expressis verbis not allowed to measure distances, while in the 8th, you are specifically allowed and, indeed, sometimes required to measure distances, since you cannot declare charges against a target that is outside of the chargers' maximum possible charge range.