Skip to content
  • tapted's avatar
    Move bit_cast from base/macros.h to its own header · 174fde33
    tapted authored
    There isn't much that uses bit_cast. bit_cast requires memcpy which
    requires <string.h>
    
    On Mac, <string.h> includes AvailabilityInternal.h which is half a
    megabyte and defines dozens of macros. Providing <string.h> in
    base/macros.h also tempts IWYU violations. Try to avoid it.
    
    Add base/bit_cast.h and include it from the 17 files that need it. Then
    remove the <string.h> #include from base/macros.h and IWYU.
    
    BUG=395001
    
    Review URL: https://codereview.chromium.org/399313006
    
    Cr-Commit-Position: refs/heads/master@{#369348}
    174fde33