Although both sides of the Brexit talks have resolved to secure the position of expats by the time the UK leaves the EU in March 2019, any deal reached will have to be approved by the European Parliament and agreed to by member states.
If the UK leaves the EU with a ‘No Deal’ then the status of British citizens living in EU countries is less certain.
The UK would expect member states to allow UK citizens living in the EU the same rights as it plans to grant EU citizens living in the UK – but it would be down to individual countries to decide what to do.