Some digital cameras has this as a built-in feature. My 5D III has this and it's even configurable (you can tell it to do additive/averaging, or give priority to highlights vs. darks.
But there's very little reason to actually do a double exposure "in camera" for a digital camera. Since the image really is being digitally captured, doing the merge in software is as effective (and can offer more control while also probably being less cumbersome) than doing it in-camera. An in-camera double-exposure for most cameras can only be "additive".