• Joe Loser's avatar
    Add to_underlying_type to cast enum to underlying (#1028) · 83b597e5
    Joe Loser authored
    Summary:
    - It is verbose at the call sites to cast an enum or enum class to its
      underlying type.
    - Introduce `to_underlying_type`, which, given an enum or enum class,
      returns the value from static casting to the underlying type.
    Pull Request resolved: https://github.com/facebook/folly/pull/1028
    
    Reviewed By: stevegury
    
    Differential Revision: D14199619
    
    Pulled By: yfeldblum
    
    fbshipit-source-id: fde85b9be50945a390b18ba1448a0137f3d7b63e
    83b597e5
DynamicConverter.h 11.1 KB