|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by alshabalin Modified:
4 years, 1 month ago CC:
chromium-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake base::Optional constructor constexpr.
BUG=
Committed: https://crrev.com/9494e454fa120c3d77f87c66142ef35f85ff225b
Cr-Commit-Position: refs/heads/master@{#427311}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Make nullopt constructor constexpr. #Patch Set 3 : Make value constructors constexpr. #
Total comments: 6
Patch Set 4 : Address review comments. #Patch Set 5 : Remove constexpr from move and forward ctors #Patch Set 6 : Remove delegating ctor from nullopt ctor #Messages
Total messages: 37 (16 generated)
Description was changed from ========== Make base::Optional constructor constexpr. BUG= ========== to ========== Make base::Optional constructor constexpr. BUG= ==========
alshabalin@yandex-team.ru changed reviewers: + danakj@chromium.org
PTAL
https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc File base/optional_unittest.cc (right): https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc#n... base/optional_unittest.cc:99: static_assert(!base::Optional<bool>(), "OptionalHasConstexprConstructor"); Can you add tests for the other constructors as well that should be constexpr? http://en.cppreference.com/w/cpp/utility/optional/optional
https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc File base/optional_unittest.cc (right): https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc#n... base/optional_unittest.cc:99: static_assert(!base::Optional<bool>(), "OptionalHasConstexprConstructor"); On 2016/10/21 21:05:01, danakj wrote: > Can you add tests for the other constructors as well that should be constexpr? > http://en.cppreference.com/w/cpp/utility/optional/optional Done (partially). Reading http://en.cppreference.com/w/cpp/language/constexpr it seems that until C++14 constructors of union-like classes cannot be constexpr. This means that only Optional of types with trivial special member functions can have constexpr constructors.
LGTM w nits https://codereview.chromium.org/2434253003/diff/40001/base/optional.h File base/optional.h (right): https://codereview.chromium.org/2434253003/diff/40001/base/optional.h#newcode45 base/optional.h:45: // When T is not trivially destructible we must call its nit: whitespace above this to separate it since we have a lot of constructors now https://codereview.chromium.org/2434253003/diff/40001/base/optional.h#newcode72 base/optional.h:72: // When T is trivially destructible (i.e. its destructor does nothing) there same https://codereview.chromium.org/2434253003/diff/40001/base/optional_unittest.cc File base/optional_unittest.cc (right): https://codereview.chromium.org/2434253003/diff/40001/base/optional_unittest.... base/optional_unittest.cc:201: constexpr float value = 0.1f; Can you make all 3 cases in this test look alike? None of them need a first Optional instance to call value() on really.
https://codereview.chromium.org/2434253003/diff/40001/base/optional.h File base/optional.h (right): https://codereview.chromium.org/2434253003/diff/40001/base/optional.h#newcode45 base/optional.h:45: // When T is not trivially destructible we must call its On 2016/10/21 23:12:08, danakj wrote: > nit: whitespace above this to separate it since we have a lot of constructors > now Done. https://codereview.chromium.org/2434253003/diff/40001/base/optional.h#newcode72 base/optional.h:72: // When T is trivially destructible (i.e. its destructor does nothing) there On 2016/10/21 23:12:08, danakj wrote: > same Done. https://codereview.chromium.org/2434253003/diff/40001/base/optional_unittest.cc File base/optional_unittest.cc (right): https://codereview.chromium.org/2434253003/diff/40001/base/optional_unittest.... base/optional_unittest.cc:201: constexpr float value = 0.1f; On 2016/10/21 23:12:08, danakj wrote: > Can you make all 3 cases in this test look alike? None of them need a first > Optional instance to call value() on really. Done.
The CQ bit was checked by alshabalin@yandex-team.ru
The patchset sent to the CQ was uploaded after l-g-t-m from danakj@chromium.org Link to the patchset: https://codereview.chromium.org/2434253003/#ps60001 (title: "Address review comments.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by alshabalin@yandex-team.ru to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/10/21 21:05:02, danakj wrote: > https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc > File base/optional_unittest.cc (right): > > https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc#n... > base/optional_unittest.cc:99: static_assert(!base::Optional<bool>(), > "OptionalHasConstexprConstructor"); > Can you add tests for the other constructors as well that should be constexpr? > http://en.cppreference.com/w/cpp/utility/optional/optional More bad news: std::move and std::forward are constexpr only since C++14. So constructors from T&& and the forwarding constructor can't be constexpr.
On 2016/10/22 22:16:26, alshabalin wrote: > On 2016/10/21 21:05:02, danakj wrote: > > https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc > > File base/optional_unittest.cc (right): > > > > > https://codereview.chromium.org/2434253003/diff/1/base/optional_unittest.cc#n... > > base/optional_unittest.cc:99: static_assert(!base::Optional<bool>(), > > "OptionalHasConstexprConstructor"); > > Can you add tests for the other constructors as well that should be constexpr? > > http://en.cppreference.com/w/cpp/utility/optional/optional > > More bad news: std::move and std::forward are constexpr only since C++14. So > constructors from T&& and the forwarding constructor can't be constexpr. Also removed delegating constructor from Optional(base::nullopt_t): there seems to be a bug in MSVC 2015 http://stackoverflow.com/questions/32489702/constexpr-with-delegating-constru...
The CQ bit was checked by alshabalin@yandex-team.ru to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...)
Everything seems to work now. Could you please take another look?
LGTM thanks for the todos and investigations
The CQ bit was checked by danakj@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by alshabalin@yandex-team.ru
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Make base::Optional constructor constexpr. BUG= ========== to ========== Make base::Optional constructor constexpr. BUG= ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Make base::Optional constructor constexpr. BUG= ========== to ========== Make base::Optional constructor constexpr. BUG= Committed: https://crrev.com/9494e454fa120c3d77f87c66142ef35f85ff225b Cr-Commit-Position: refs/heads/master@{#427311} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/9494e454fa120c3d77f87c66142ef35f85ff225b Cr-Commit-Position: refs/heads/master@{#427311}
Message was sent while issue was closed.
This seems to have broken GCC (tested with 4.8) builds:
FAILED: obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
ccache g++ -MMD -MF
obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o.d
-DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS
-DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_SPELLCHECK=1
-DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_DEFAULT_RENDER_THEME=1
-DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1
-DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_SESSION_SERVICE=1
-DENABLE_SUPERVISED_USERS=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
-DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1
-DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
-DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX
-DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1
-DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT=
-DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen
-I../../third_party/khronos -I../../gpu -I../../skia/config -I../../skia/ext
-I../../third_party/skia/include/c -I../../third_party/skia/include/config
-I../../third_party/skia/include/core -I../../third_party/skia/include/effects
-I../../third_party/skia/include/images -I../../third_party/skia/include/lazy
-I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf
-I../../third_party/skia/include/pipe -I../../third_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/icu/source/common -I../../third_party/icu/source/i18n
-fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables
-fPIC -pipe -pthread -m64 -march=x86-64 -Wall -Werror -Wno-unused-local-typedefs
-Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter
-O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden
-fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing
-fno-rtti -fno-exceptions -c gen/services/ui/public/interfaces/ime.mojom.cc -o
obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
In file included from gen/services/ui/public/interfaces/ime.mojom.h:10:0,
from gen/services/ui/public/interfaces/ime.mojom.cc:15:
/usr/include/c++/4.8/type_traits: In instantiation of 'struct
std::is_convertible<std::default_delete<ui::Event>,
std::default_delete<ui::Event> >':
/usr/include/c++/4.8/type_traits:116:12: required from 'struct
std::__and_<std::__not_<std::is_array<ui::Event> >,
std::is_convertible<std::default_delete<ui::Event>,
std::default_delete<ui::Event> > >'
/usr/include/c++/4.8/type_traits:121:12: required from 'struct
std::__and_<std::is_convertible<ui::Event*, ui::Event*>,
std::__not_<std::is_array<ui::Event> >,
std::is_convertible<std::default_delete<ui::Event>,
std::default_delete<ui::Event> > >'
/usr/include/c++/4.8/type_traits:1775:71: required by substitution of
'template<class ... _Cond> using _Require = typename std::enable_if<std::__and_<
<template-parameter-1-1> >::value>::type [with _Cond =
{std::is_convertible<ui::Event*, ui::Event*>,
std::__not_<std::is_array<ui::Event> >, std::conditional<false,
std::is_same<std::default_delete<ui::Event>, std::default_delete<ui::Event> >,
std::is_convertible<std::default_delete<ui::Event>,
std::default_delete<ui::Event> > >::type}]'
/usr/include/c++/4.8/bits/unique_ptr.h:163:44: required from 'constexpr
base::internal::OptionalStorage<T, <anonymous> >::OptionalStorage() [with T =
std::unique_ptr<ui::Event>; bool <anonymous> = false]'
../../base/optional.h:119:13: required from here
/usr/include/c++/4.8/type_traits:1317:12: error: the value of
'std::__is_convertible_helper<std::default_delete<ui::Event>,
std::default_delete<ui::Event>, false>::value' is not usable in a constant
expression
/usr/include/c++/4.8/type_traits:1312:29: note:
'std::__is_convertible_helper<std::default_delete<ui::Event>,
std::default_delete<ui::Event>, false>::value' used in its own initializer
/usr/include/c++/4.8/type_traits:1317:12: note: in template argument for type
'bool'
gen/services/ui/public/interfaces/ime.mojom.cc: In constructor
'ui::mojom::CompositionEvent::CompositionEvent()':
gen/services/ui/public/interfaces/ime.mojom.cc:75:17: note: synthesized method
'constexpr base::Optional<T>::Optional() [with T = std::unique_ptr<ui::Event>]'
first required here
Message was sent while issue was closed.
On 2016/10/25 13:01:11, Mostyn Bramley-Moore wrote:
> This seems to have broken GCC (tested with 4.8) builds:
Android bots use gcc, where are u getting this error?
> FAILED: obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
> ccache g++ -MMD -MF
> obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o.d
> -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS
> -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_SPELLCHECK=1
> -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_DEFAULT_RENDER_THEME=1
> -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1
> -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_SESSION_SERVICE=1
> -DENABLE_SUPERVISED_USERS=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
> -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1
> -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
> -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
> -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX
> -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1
> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT=
> -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../..
-Igen
> -I../../third_party/khronos -I../../gpu -I../../skia/config -I../../skia/ext
> -I../../third_party/skia/include/c -I../../third_party/skia/include/config
> -I../../third_party/skia/include/core -I../../third_party/skia/include/effects
> -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy
> -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf
> -I../../third_party/skia/include/pipe -I../../third_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/icu/source/common -I../../third_party/icu/source/i18n
> -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector
-funwind-tables
> -fPIC -pipe -pthread -m64 -march=x86-64 -Wall -Werror
-Wno-unused-local-typedefs
> -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter
> -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden
> -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11
-Wno-narrowing
> -fno-rtti -fno-exceptions -c gen/services/ui/public/interfaces/ime.mojom.cc -o
> obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
> In file included from gen/services/ui/public/interfaces/ime.mojom.h:10:0,
> from gen/services/ui/public/interfaces/ime.mojom.cc:15:
> /usr/include/c++/4.8/type_traits: In instantiation of 'struct
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> >':
> /usr/include/c++/4.8/type_traits:116:12: required from 'struct
> std::__and_<std::__not_<std::is_array<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >'
> /usr/include/c++/4.8/type_traits:121:12: required from 'struct
> std::__and_<std::is_convertible<ui::Event*, ui::Event*>,
> std::__not_<std::is_array<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >'
> /usr/include/c++/4.8/type_traits:1775:71: required by substitution of
> 'template<class ... _Cond> using _Require = typename
std::enable_if<std::__and_<
> <template-parameter-1-1> >::value>::type [with _Cond =
> {std::is_convertible<ui::Event*, ui::Event*>,
> std::__not_<std::is_array<ui::Event> >, std::conditional<false,
> std::is_same<std::default_delete<ui::Event>, std::default_delete<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >::type}]'
> /usr/include/c++/4.8/bits/unique_ptr.h:163:44: required from 'constexpr
> base::internal::OptionalStorage<T, <anonymous> >::OptionalStorage() [with T =
> std::unique_ptr<ui::Event>; bool <anonymous> = false]'
> ../../base/optional.h:119:13: required from here
> /usr/include/c++/4.8/type_traits:1317:12: error: the value of
> 'std::__is_convertible_helper<std::default_delete<ui::Event>,
> std::default_delete<ui::Event>, false>::value' is not usable in a constant
> expression
> /usr/include/c++/4.8/type_traits:1312:29: note:
> 'std::__is_convertible_helper<std::default_delete<ui::Event>,
> std::default_delete<ui::Event>, false>::value' used in its own initializer
> /usr/include/c++/4.8/type_traits:1317:12: note: in template argument for type
> 'bool'
> gen/services/ui/public/interfaces/ime.mojom.cc: In constructor
> 'ui::mojom::CompositionEvent::CompositionEvent()':
> gen/services/ui/public/interfaces/ime.mojom.cc:75:17: note: synthesized method
> 'constexpr base::Optional<T>::Optional() [with T =
std::unique_ptr<ui::Event>]'
> first required here
Message was sent while issue was closed.
On 2016/10/25 20:18:09, danakj wrote: > On 2016/10/25 13:01:11, Mostyn Bramley-Moore wrote: > > This seems to have broken GCC (tested with 4.8) builds: > > Android bots use gcc, where are u getting this error? I am building on ubuntu 14.04. This seems to be sufficient to reproduce the error: rm -rf out_foo gn gen out_foo --args="cc_wrapper=\"ccache\" is_clang=false use_sysroot=false" # the cc_wrapper part is optional ninja -C out_foo obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
Message was sent while issue was closed.
On 2016/10/25 22:13:25, Mostyn Bramley-Moore wrote:
> On 2016/10/25 20:18:09, danakj wrote:
> > On 2016/10/25 13:01:11, Mostyn Bramley-Moore wrote:
> > > This seems to have broken GCC (tested with 4.8) builds:
> >
> > Android bots use gcc, where are u getting this error?
>
> I am building on ubuntu 14.04. This seems to be sufficient to reproduce the
> error:
>
> rm -rf out_foo
> gn gen out_foo --args="cc_wrapper=\"ccache\" is_clang=false use_sysroot=false"
#
> the cc_wrapper part is optional
> ninja -C out_foo
> obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
I managed to reproduce with this code snippet:
#include <memory>
class C {
public:
constexpr C() {}
~C() {}
private:
union {
char empty_ = '\0';
std::unique_ptr<int> value_;
};
};
int main() {
return 0;
}
g++ 4.8 fails to compile while g++ 6.2 compiles successfully. I didn't find
any explanation as to why but adding empty_('\0') to the member initializer list
made g++ 4.8 happy.
Message was sent while issue was closed.
On 2016/10/25 13:01:11, Mostyn Bramley-Moore wrote:
> This seems to have broken GCC (tested with 4.8) builds:
>
> FAILED: obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
> ccache g++ -MMD -MF
> obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o.d
> -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS
> -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_SPELLCHECK=1
> -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_DEFAULT_RENDER_THEME=1
> -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1
> -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_SESSION_SERVICE=1
> -DENABLE_SUPERVISED_USERS=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
> -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1
> -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
> -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
> -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSK_IGNORE_DW_GRAY_FIX
> -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1
> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT=
> -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../..
-Igen
> -I../../third_party/khronos -I../../gpu -I../../skia/config -I../../skia/ext
> -I../../third_party/skia/include/c -I../../third_party/skia/include/config
> -I../../third_party/skia/include/core -I../../third_party/skia/include/effects
> -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy
> -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf
> -I../../third_party/skia/include/pipe -I../../third_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/icu/source/common -I../../third_party/icu/source/i18n
> -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector
-funwind-tables
> -fPIC -pipe -pthread -m64 -march=x86-64 -Wall -Werror
-Wno-unused-local-typedefs
> -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter
> -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden
> -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11
-Wno-narrowing
> -fno-rtti -fno-exceptions -c gen/services/ui/public/interfaces/ime.mojom.cc -o
> obj/services/ui/public/interfaces/interfaces_cpp_sources/ime.mojom.o
> In file included from gen/services/ui/public/interfaces/ime.mojom.h:10:0,
> from gen/services/ui/public/interfaces/ime.mojom.cc:15:
> /usr/include/c++/4.8/type_traits: In instantiation of 'struct
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> >':
> /usr/include/c++/4.8/type_traits:116:12: required from 'struct
> std::__and_<std::__not_<std::is_array<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >'
> /usr/include/c++/4.8/type_traits:121:12: required from 'struct
> std::__and_<std::is_convertible<ui::Event*, ui::Event*>,
> std::__not_<std::is_array<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >'
> /usr/include/c++/4.8/type_traits:1775:71: required by substitution of
> 'template<class ... _Cond> using _Require = typename
std::enable_if<std::__and_<
> <template-parameter-1-1> >::value>::type [with _Cond =
> {std::is_convertible<ui::Event*, ui::Event*>,
> std::__not_<std::is_array<ui::Event> >, std::conditional<false,
> std::is_same<std::default_delete<ui::Event>, std::default_delete<ui::Event> >,
> std::is_convertible<std::default_delete<ui::Event>,
> std::default_delete<ui::Event> > >::type}]'
> /usr/include/c++/4.8/bits/unique_ptr.h:163:44: required from 'constexpr
> base::internal::OptionalStorage<T, <anonymous> >::OptionalStorage() [with T =
> std::unique_ptr<ui::Event>; bool <anonymous> = false]'
> ../../base/optional.h:119:13: required from here
> /usr/include/c++/4.8/type_traits:1317:12: error: the value of
> 'std::__is_convertible_helper<std::default_delete<ui::Event>,
> std::default_delete<ui::Event>, false>::value' is not usable in a constant
> expression
> /usr/include/c++/4.8/type_traits:1312:29: note:
> 'std::__is_convertible_helper<std::default_delete<ui::Event>,
> std::default_delete<ui::Event>, false>::value' used in its own initializer
> /usr/include/c++/4.8/type_traits:1317:12: note: in template argument for type
> 'bool'
> gen/services/ui/public/interfaces/ime.mojom.cc: In constructor
> 'ui::mojom::CompositionEvent::CompositionEvent()':
> gen/services/ui/public/interfaces/ime.mojom.cc:75:17: note: synthesized method
> 'constexpr base::Optional<T>::Optional() [with T =
std::unique_ptr<ui::Event>]'
> first required here
I've made a follow up CL fixing this:
https://codereview.chromium.org/2453733002/
|
