Arthur Schnitzler, Casanova's Heimfahrt.

Schnitzler wrote entertainingly, as the clue says, of the decadence of Vienna at the end of the Habsburg empire, but this is a quasi-historical fantasy in which Casanova for once doesn't get his woman.