Skip to content
Browse files

IWYU: include algorithm to use std::lower_bound in ui/gfx/

[openSUSE chromium-79-include.patch]

Fix GCC build because of missing include:
../../ui/gfx/ In function ‘gfx::Font::Weight gfx::FontWeightFromInt(int)’:
../../ui/gfx/ error: no matching function for call to ‘lower_bound(const gfx::Font::Weight*, const gfx::Font::Weight*, int&, gfx::FontWeightFromInt(int)::<lambda(const gfx::Font::Weight&, const int&)>)’
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/string:40,
                 from ../../ui/gfx/font.h:8,
                 from ../../ui/gfx/
/usr/include/c++/8/bits/stl_algobase.h:984:5: note: candidate: ‘template<class _ForwardIterator, class _Tp> _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)’
     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
/usr/include/c++/8/bits/stl_algobase.h:984:5: note:   template argument deduction/substitution failed:
../../ui/gfx/ note:   candidate expects 3 arguments, 4 provided

Bug: 819294
Change-Id: Ic59dcf3a06bdd54d1d426c08a61624873a0ff30c
Commit-Queue: Alexei Svitkine <>
Reviewed-by: Alexei Svitkine <>
Cr-Commit-Position: refs/heads/master@{#709472}
  • Loading branch information
jdapena authored and jengelh committed Oct 25, 2019
1 parent 4c6a629 commit 657caf5140e1e1133611778425aa34352d093d76
Showing with 4 additions and 0 deletions.
  1. +1 −0 base/profiler/register_context.h
  2. +1 −0 chrome/browser/apps/launch_service/launch_manager.h
  3. +2 −0 ui/gfx/
@@ -9,6 +9,7 @@

#include <cstdint>
#include <type_traits>

#include "build/build_config.h"
@@ -6,6 +6,7 @@

#include <string>
#include <vector>

#include "base/macros.h"

@@ -4,6 +4,8 @@

#include "ui/gfx/font.h"

#include <algorithm>

#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "ui/gfx/platform_font.h"

0 comments on commit 657caf5

Please sign in to comment.
You can’t perform that action at this time.