Skip to content
  • Adam Rice's avatar
    Prevent Koenig-lookup of base::string16 arguments · ff26dcf0
    Adam Rice authored
    Previously functions in base that took a base::string16 argument could
    be used unqualified on platforms where std::wstring is 32-bit. This was
    surprising and inconsistent.
    
    Move base::string16_char_traits into namespace base::string16_internals
    to prevent argument-dependent lookup from finding functions in
    base::. This doesn't break existing code because it was already
    necessary to specify the base:: namespace for it to compile on Windows.
    
    Also remove the base::string16_char_traits typedef on platforms where
    base::string16 is std::wstring, for consistency.
    
    TBR=sky@chromium.org,donnd@chromium.org,mtomasz@chromium.org,rsesek@chromium.org,bauerb@chromium.org,calamity@chromium.org,dvadym@chromium.org,dpranke@chromium.org,rjkroege@chromium.org,tapted@chromium.org
    BUG=752856
    
    Change-Id: I76ff1691763f552c3140329c2701b0bf61e8c911
    Reviewed-on: https://chromium-review.googlesource.com/603888
    
    
    Commit-Queue: Adam Rice <ricea@chromium.org>
    Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
    Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#494014}
    ff26dcf0