fixes ticket 10676. for now, we'll use tr1_result_of. we'll have to do an overhaul of the fold implementation because making it sfinae friendly goes deep down into the low level internals.