I have in the past and it has ended well and we continued to be friends. It comes down to maturity.
If the feelings are not mutual then they can still survive the friendship, if the respect of friendship and common ground is still there.
Friendship is about being able to be honest with each other. If you have feelings for a friend and they are not returned then there is no reason to break that friendship. The trick is to not burden the friendship with your unwanted feelings.