Honestly, it completely depends on the jurisdiction and the context. In a lot of situations, where you get your mail will be treated as your residence.
OTOH, what most might consider a temporary residence- say, a cardboard box over a vent- might still be as protected from unconstitutional search & seizure like the governor’s mansion if someone can establish that’s where they’ve been living for a while. Even if they move the box. Even if they’ve changed boxes.
But in that same jurisdiction, that same constitutionally protected box may not be considered a residence for purposes of other laws, like child custody laws, parole laws, voting laws, and so forth.
OTOH, what most might consider a temporary residence- say, a cardboard box over a vent- might still be as protected from unconstitutional search & seizure like the governor’s mansion if someone can establish that’s where they’ve been living for a while. Even if they move the box. Even if they’ve changed boxes.
But in that same jurisdiction, that same constitutionally protected box may not be considered a residence for purposes of other laws, like child custody laws, parole laws, voting laws, and so forth.