The processes of decay will kill the living grass and weeds, eventually. The weed seeds will however remain in the soil, but lie dormant. As soon as you use the 'compost', and expose the seeds to the light, they will know it's time to wake up.
I don't know how long weed seeds remain viable. It probably depends on the species but can be several years.
In practise that isn't a problem. You'll just need to be prepared to some weeding.
But decent soil is a valuable resource, so make sure you reuse it yourself.