New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716504 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Participants' hotlists:
Chromium-Packagers


Sign in to add a comment

base/containers/flat_set.h: error: no type named 'less' in namespace 'std'

Project Member Reported by phajdan.jr@chromium.org, Apr 28 2017

Issue description

I'm getting the following compile error with clang-3.9.1-r100 and sys-devel/clang-4.0.0 :

FAILED: obj/cc/cc/transferable_resource.o
clang++ -MMD -MF obj/cc/cc/transferable_resource.o.d -DCC_IMPLEMENTATION=1 -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DU
SE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB
_LOCAL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=\"300839-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MA
CROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_M
IN_REQUIRED=GLIB_VERSION_2_26 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DENABLE_I
PC_FUZZER -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -I../.. -Igen -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -
Igen/shim_headers/icuuc_shim -Igen/shim_headers/zlib_shim -Igen/shim_headers/libpng_shim -Igen/shim_headers/libjpeg_shim -I../../third_party/k
hronos -I../../gpu -Igen/shim_headers/libdrm_shim -Igen/shim_headers/re2_shim -Igen/shim_headers/icui18n_shim -Igen/shim_headers/harfbuzz_shim
 -Igen/shim_headers/ffmpeg_shim -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/confi
g -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/s
kia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../t
hird_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I.
./../third_party/skia/src/sksl -I../../third_party/mesa/src/include -I../../third_party/libwebm/source -I../../third_party/libyuv/include -fno
-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-ta
bles -fPIC -pipe -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++1
1-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno
-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -O2 -fno-ident -fdata-sections -
ffunction-sections -fomit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibili
ty-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -O2 -pipe -march=native -c ../../cc/resources/transferable_resource.cc -o obj/cc/cc/t
ransferable_resource.o
warning: unknown warning option '-Wno-address-of-packed-member' [-Wunknown-warning-option]
warning: unknown warning option '-Wno-unused-lambda-capture'; did you mean '-Wno-unused-parameter'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-user-defined-warnings'; did you mean '-Wno-user-defined-literals'? [-Wunknown-warning-option]
In file included from ../../cc/resources/transferable_resource.cc:5:
In file included from ../../cc/resources/returned_resource.h:10:
In file included from ../../cc/base/resource_id.h:10:
../../base/containers/flat_set.h:157:43: error: no type named 'less' in namespace 'std'
template <class Key, class Compare = std::less<Key>>
                                     ~~~~~^
../../base/containers/flat_set.h:157:47: error: expected ',' or '>' in template-parameter-list
template <class Key, class Compare = std::less<Key>>
                                              ^
../../base/containers/flat_set.h:157:52: error: expected unqualified-id
template <class Key, class Compare = std::less<Key>>
                                                   ^
In file included from ../../cc/resources/transferable_resource.cc:5:
In file included from ../../cc/resources/returned_resource.h:10:
../../cc/base/resource_id.h:15:29: error: no type named 'flat_set' in namespace 'base'
using ResourceIdSet = base::flat_set<ResourceId>;
                      ~~~~~~^
../../cc/base/resource_id.h:15:37: error: expected ';' after alias declaration
using ResourceIdSet = base::flat_set<ResourceId>;
                                    ^
                                    ;
3 warnings and 5 errors generated.
 
Owner: phajdan.jr@chromium.org
Status: Started (was: Untriaged)
Uploaded https://codereview.chromium.org/2849913002/# .
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c47196bd73aa1a84ef4603c510dcd2175703cb75

commit c47196bd73aa1a84ef4603c510dcd2175703cb75
Author: phajdan.jr <phajdan.jr@chromium.org>
Date: Fri Apr 28 19:20:06 2017

Fix a compile error

std::less requires #include <functional>,
see e.g. http://en.cppreference.com/w/cpp/utility/functional/less

See the bug for more context.

BUG= 716504 

Review-Url: https://codereview.chromium.org/2849913002
Cr-Commit-Position: refs/heads/master@{#468088}

[modify] https://crrev.com/c47196bd73aa1a84ef4603c510dcd2175703cb75/base/containers/flat_set.h

 Issue 717451  has been merged into this issue.
Status: Fixed (was: Started)

Sign in to add a comment