Todd Haynes has named Brief Encounter as the model for Carol's structure, and the borrowing is the frame itself. Both films open on a conversation in a public place, interrupted by a third person who has no idea what they have walked into; both then tell the story in flashback and return to that same scene at the end, so the audience watches it a second time knowing everything. Carol's tea-room parting is Lean's railway buffet. What Haynes changes is what the constraint is made of. Lean's lovers are stopped by marriage and propriety; Carol's are stopped by a morality clause and a private investigator, and the film refuses Lean's renunciation at the end.
