Smooth solutions of the Euler and Navier–Stokes equations from the a posteriori analysis of approximate solutions