Somebody questioned my reference to class war of a week ago. Whereas the rhetoric around class solidarity tends to come from the left and is often informed by a Marxist view of a shared mode of production, the closest class solidarity does seem to be of aristocrats and royalty.
Even just sticking to examples of shipwrecks, one can see examples of such class solidarity. According to the Amanda Foreman book I read a couple of weeks ago, the officer of the CSS Alabama arranged for themselves to be disembarked on board a yacht bound for England in her final action, leaving the ordinary sailors to drown. The most striking example I can think of is a letter from Napoleon to Tsar Alexander after the burning of Moscow in which he declared "I made war on you without any hostile feeling." When I first read that I thought the Tsar would probably consider Napoleon something of a parvenu, although as he was himself descended from the relatively modest lineage of Catherine the Great, perhaps not. I suppose the system of parole common up to the American Civil War and the systems of ransoms familiar in the Middle Ages, would have been far harder without this class solidarity.
There are exceptions, but as far as I can see these come from people in radically different cultures. Valerian was famously said to have been treated as a human footstool by the Persian Emperor before being stuffed and mounted after execution. Edward Gibbon doubted the veracity of this account precisely because he thought no monarch would treat another so. The Mongols are said to have ridden there horses over the dead body of the ruler of Baghdad after captured the City, and Tamerlane is said to have carried a captured Ottoman Emperor in an iron cage on the back of a camel. However, these are all examples of aristocrats from radically different cultures, which might be likely to diminish their sense of solidarity.