It might depend on what country you are in. In the USA you don't see such a marking. Utah puts a yellow line at the right side of the pavement. In any other place they use yellow to indicate that caution is required.
In usa if you have a dotted yellow line near you it means you can pass but if you don't and have a solid line near you like you stated it means you are not in a passing zone .. Hope this helps
No-passing lines are usually there because it's unsafe to cross the centre line to pass, because features like hills and curves make it impossible to see if there is oncoming traffic.