Boost inspired Any + more affinity testing