This part of GOV.UK is being rebuilt – find out what beta means

HMRC internal manual

Capital Gains Manual

Private residence relief: the entity of the dwelling house: building not a dwelling house

In a small number of cases the owner may have a residence within a factory, purpose built hotel or other building that cannot be regarded as a dwelling house. In such cases the rooms actually occupied as a residence should be regarded as a dwelling house whether or not they are self contained.