The writer-director of Sleeping with Other People, Leslye Headland (Bachelorette), glibly described her romantic sex comedy as “When Harry Met Sally for assholes.” Okay, so how does that work? Pretty damn sweetly, actually, with Jason Sudeikis and Alison Brie starting out playing a pair of Columbia University student virgins (suspension of disbelief, people) who hook up and, 12 years later, randomly encounter each at a meeting for sex addicts.

During the intervening years, Jake (Sudeikis) has morphed into a smug, insecure dog who sleeps around compulsively but cuts and runs whenever relationships gets too tight; Lainey (Brie) is now a kindergarten teacher with a frustrating personal life and a unscratched itch for the putz who wouldn’t take her virginity all those years ago (Adam Scott, sporting his Black Mass moustache, doing what he can with a one-note character). Both make terrible choices. The smart, reckless Lainey has been cheating on her longtime boyfriend (Adam Brody, just right) and the affable slime ball Jake (whose girlfriend caught him sleeping with her bestie), so they decide against sleeping with each other again. But, as they hang out as inseparable friends, the funny, cutting, sexy — and, yeah, even touching — movie manages to make their relationship a blast to watch and a regretful look at the messed-up state of modern romance.

Unlike how she handled Bachelorette, Headland dials down the raunch a tad but keeps the comic situations coming thick and fast, with such highlights as a druggy kids’ birthday party, a near riot during a brunch, a deeply funny brawl between two dudes, and the hero teaching the heroine how to pleasure herself using an empty bottle of tea. The whole thing rests on Brie and Sudeikis and not only is their chemistry potent but they also make a master class in charm and likeability. In supporting roles, too, the fantastic Amanda Peet works great as Sudeikis’ hot boss, Jason Mantzoukas and Andrea Savage (in rough approximations of the roles played by Bruno Kirby and Carrie Fisher in When Harry Met Sally) score big points every time they’re on screen, and Natasha Lyonne (Orange Is the New Black) gets in her licks in the ‘cool friend’ role. Sleeping with Other People is a smartened-up romantic comedy for assholes — and everyone else.

Sleeping With Other People