No matter how carefully you weed, there will always be a few that get by. Not all weeds are created equally. Some have more beneficial properties than others, but in all cases, if you're going to compost them, do it before they flower and set seed.
The most common weeds in my garden tend to have tap roots, like dandelions, or even fireweed which grows many stalks from a single root, extending over a wide area.
There are also lots of plantain in my garden - this is used medicinally for salves if you needed another use for it.
I also have several different clover relatives that can spread and choke out other plants. These all have one benefit that other plants don't; they're leguminous, and have nitrogen nodules on their roots.
This makes them the perfect candidate for composting.
It's absolutely essential to pull them before they flower and grow seeds - no matter how hot your compost is, it won't kill off all the seeds, and when you spread the finished compost, you'll also be seeding the bed with weeds.
Best ways to dig up weeds with tap roots is with a long dandelion weeder. Many weeds have the ability to regenerate from just a tiny bit of the root if it's left behind. Keeping in mind that many of these kinds of weeds actually perform a useful service, this means that the soil will most likely be compacted and hard.
Digging them up and composting them means that your finished compost will have lots of the nutrients from lower levels of soil, brought to the surface and stored in the tap roots of the weeds.