Right now this doesn't compile. It's possible in tests to do EXPECT_EQ(size1, size2). I think we need to hook up void PrintTo(const Size& size, ::std::ostream* os) somewhere in base/logging.
Assigning to danakj@ as owner of both gfx and base for triage.
../../base/logging.h:713:3: error: no matching function for call to 'MakeCheckOpValueString'
MakeCheckOpValueString(&ss, v1);
^~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:761:1: note: in instantiation of function template specialization 'logging::MakeCheckOpString<gfx::Size, gfx::Size>' requested here
DEFINE_CHECK_OP_IMPL(EQ, ==)
^
../../base/logging.h:753:25: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
return ::logging::MakeCheckOpString(v1, v2, names); \
^
../../chrome/browser/ui/views/tabs/new_tab_button.cc:182:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<gfx::Size, gfx::Size>' requested here
DCHECK_EQ(ink_drop_layer->bounds().size(), GetVisibleBounds().size());
^
../../base/logging.h:936:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
^
../../base/logging.h:890:18: note: expanded from macro 'DCHECK_OP'
::logging::Check##name##Impl((val1), (val2), \
^
<scratch space>:32:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:703:18: note: candidate function not viable: no known conversion from 'const gfx::Size' to 'std::nullptr_t' (aka 'nullptr_t') for 2nd argument
BASE_EXPORT void MakeCheckOpValueString(std::ostream* os, std::nullptr_t p);
^
../../base/logging.h:674:1: note: candidate template ignored: requirement 'base::internal::SupportsOstreamOperator<const Size &>::value' was not satisfied [with T = gfx::Size]
MakeCheckOpValueString(std::ostream* os, const T& v) {
^
../../base/logging.h:687:1: note: candidate template ignored: requirement 'std::is_function<typename std::remove_pointer<Size>::type>::value' was not satisfied [with T = gfx::Size]
MakeCheckOpValueString(std::ostream* os, const T& v) {
^
../../base/logging.h:698:1: note: candidate template ignored: requirement 'std::is_enum<Size>::value' was not satisfied [with T = gfx::Size]
MakeCheckOpValueString(std::ostream* os, const T& v) {
^
Comment 1 by danakj@chromium.org
, Feb 23 2018Owner: ----
Status: Available (was: Assigned)