Remove exception declaration on cpp templates

Change-Id: Ic3705ad08d8f611f9ce6851ab58aaf63e9129f35