Heroes forged in Afghanistan and Iraq are having their names bestowed on a new generation of warships.