Created attachment 470074 [details] build.log media-gfx/hugin-2016.2.0::gentoo failed (compile phase)
Created attachment 470076 [details] emerge --info
You didn't upgrade to GCC-5 properly (please read news items). Rebuild exiv2 and it will work (or fail to build with another GCC-5 related error).
Created attachment 470078 [details] emerge -pqv '=media-gfx/hugin-2016.2.0::gentoo'