You will still find these on overnight trains that branch off to various destinations, such as from Munich to Zagreb/Bucharest etc.
In the case of the Tren hotel between Barcelona and Milano and Barcelona and Zurich, those "2" trains operated combined as far as Lyon Part Dieu, where they were split. In that case, it involved multiple cars, rather than just one.