• Lewis Baker's avatar
    Add folly::tag_invoke · 66dc0a6f
    Lewis Baker authored
    Summary:
    Adds a helper utility called 'tag_invoke' for defining CPOs that dispatch to a call to an overload of the ADL-name 'tag_invoke()' that takes the CPO as the first argument instead of to a CPO-specific ADL-name.
    
    This makes it possible to build generic adapters, such as type-erasing adapters, that can forward through calls to all CPOs through to an underlying object.
    
    Adds FOLLY_DECLVAL(T) helper macro used in the implementation of some of the traits.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D17867173
    
    fbshipit-source-id: fadae6ec97498008a5238036b7310a1e0ae119a2
    66dc0a6f
Invoke.h 22 KB