IWYU: std::begin() and std::end() need <iterator>
This fixes the libstdc++ build after 656eb84f8 ("Move codepage/charset
methods into related places"):
../../third_party/pdfium/core/fxcrt/fx_codepage.cpp: In function ‘uint16_t FX_GetCodePageFromCharset(uint8_t)’:
../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:212:60: error: no matching function for call to ‘begin(const {anonymous}::FX_CHARSET_MAP [31])’
std::lower_bound(std::begin(g_FXCharset2CodePageTable),
^
In file included from /usr/include/c++/7/utility:76:0,
from /usr/include/c++/7/algorithm:60,
from ../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:9:
/usr/include/c++/7/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/usr/include/c++/7/initializer_list:89:5: note: template argument deduction/substitution failed:
../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:212:60: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘const {anonymous}::FX_CHARSET_MAP*’
std::lower_bound(std::begin(g_FXCharset2CodePageTable),
^
Bug: chromium:819294
Change-Id: I3c0368af81ae274d62bf51eb6dc17d9bd71951eb
Reviewed-on: https://pdfium-review.googlesource.com/33490
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/fx_codepage.cpp b/core/fxcrt/fx_codepage.cpp
index d59c93e..c85291f 100644
--- a/core/fxcrt/fx_codepage.cpp
+++ b/core/fxcrt/fx_codepage.cpp
@@ -7,6 +7,7 @@
#include "core/fxcrt/fx_codepage.h"
#include <algorithm>
+#include <iterator>
#include <utility>
namespace {