  In the past few years, gamma-ray astronomy has entered a golden age thanks to
two major breakthroughs: Cherenkov telescopes on the ground and the Large Area
Telescope (LAT) onboard the Fermi satellite. The sample of supernova remnants
(SNRs) detected at gamma-ray energies is now much larger: it goes from evolved
supernova remnants interacting with molecular clouds up to young shell-type
supernova remnants and historical supernova remnants. Studies of SNRs are of
great interest, as these analyses are directly linked to the long standing
issue of the origin of the Galactic cosmic rays. In this context, pulsar wind
nebulae (PWNe) need also to be considered since they evolve in conjunction with
SNRs. As a result, they frequently complicate interpretation of the gamma-ray
emission seen from SNRs and they could also contribute directly to the local
cosmic ray spectrum, particularly the leptonic component. This paper reviews
the current results and thinking on SNRs and PWNe and their connection to
cosmic ray production.
