A guy can constantly remember his ex-girlfriend, compare her with a real girl, try to communicate with her as often and closer as possible - this only happens if this relationship is not over for him yet. He cannot let her go emotionally.
Much depends on how the guy and his ex-girlfriend broke up - if there was an understatement in the relationship, or the process was accompanied by scandals and tantrums, then perhaps the guy's feelings have not cooled down yet. With a calm parting, as a rule, it is possible to find out, understand and realize everything. But no matter how it happened, it only hurts you more. Try to determine your attitude towards the guy - do you have enough mental strength to fight a strong enough rival, do you want to become an important person for the guy, a companion. Do not hope to take the place of your ex-girlfriend, because you need to create conditions under which he will appreciate you no less. Fighting ghosts is quite difficult, but if you want to understand your friend, you can overcome everything. If you communicate in the same company, then you can try to become a friend of his ex-girlfriend - this will help you exclude her from the list of enemies, at the same time stop all attempts to take revenge on her part and win the guy's trust. If a guy continues to date an ex-girlfriend, then hint to him that it is unpleasant for you. There is no need to arrange interrogations, bother with questions and try to find out the details of their romance - you will only stir up old feelings and alienate him from yourself. Act smarter - show how upset you are with your behavior, you can try to end the relationship for a while. Do not accompany a temporary separation with ultimatums - the choice will clearly not be in your favor. The most constructive option is to end a hopeless relationship. If a guy really loves his ex-girlfriend, then this means that he perceives you only as a temporary object of comfort. You do not want to become a pale substitute for your ex-lover, because a person with even the most stable psyche may not stand a daily comparison. Have a heart-to-heart talk with your guy and propose a breakup, indicating the reason - let him understand why everything happens this way. In no case do not agree to a relationship "threesome" - the guy may offer you to wait, to help him forget the past, but this is just a trick. Respect yourself and don't waste time with someone who can't deal with their own life.