Is it possible to use structs that include members that are __declspec align'd with gmock?
Compiler output below:
FAILED: obj/components/page_load_metrics/renderer/unit_tests/page_timing_metrics_sender_unittest.obj
ninja -t msvc -e environment.x86 -- E:\b\build\slave\cache\cipd\goma/gomacc.exe "E:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\VC\bin\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/components/page_load_metrics/renderer/unit_tests/page_timing_metrics_sender_unittest.obj.rsp /c ../../components/page_load_metrics/renderer/page_timing_metrics_sender_unittest.cc /Foobj/components/page_load_metrics/renderer/unit_tests/page_timing_metrics_sender_unittest.obj /Fd"obj/components/page_load_metrics/renderer/unit_tests_cc.pdb"
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\internal\gtest-internal.h(892): error C2718: 'const page_load_metrics::PageLoadTiming': actual parameter with requested alignment of 8 won't be aligned
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(207): note: see reference to class template instantiation 'testing::internal::ImplicitlyConvertible<const T &,testing::internal::BiggestInt>' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(249): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &testing::internal2::operator <<<char,std::char_traits<char>,T>(std::basic_ostream<char,std::char_traits<char>> &,const T &)' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(439): note: see reference to function template instantiation 'void testing_internal::DefaultPrintNonContainerTo<T>(const T &,std::ostream *)' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(477): note: see reference to function template instantiation 'void testing::internal::DefaultPrintTo<T>(testing::internal::IsNotContainer,testing::internal::false_type,const T &,std::ostream *)' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(707): note: see reference to function template instantiation 'void testing::internal::PrintTo<T>(const T &,std::ostream *)' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(698): note: while compiling class template member function 'void testing::internal::UniversalPrinter<T1>::Print(const T &,std::ostream *)'
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(856): note: see reference to function template instantiation 'void testing::internal::UniversalPrinter<T1>::Print(const T &,std::ostream *)' being compiled
with
[
T=T1
]
e:\b\build\slave\win\build\src\testing\gtest\include\gtest\gtest-printers.h(856): note: see reference to class template instantiation 'testing::internal::UniversalPrinter<T1>' being compiled
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-matchers.h(767): note: see reference to function template instantiation 'void testing::internal::UniversalPrint<page_load_metrics::PageLoadTiming>(const T &,std::ostream *)' being compiled
with
[
T=page_load_metrics::PageLoadTiming
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-matchers.h(747): note: see reference to function template instantiation 'void testing::internal::TuplePrefix<1>::ExplainMatchFailuresTo<MatcherTuple,ValueTuple>(const MatcherTuple &,const ValueTuple &,std::ostream *)' being compiled
with
[
MatcherTuple=std::tuple<testing::Matcher<const page_load_metrics::PageLoadTiming &>,testing::Matcher<page_load_metrics::PageLoadMetadata>>,
ValueTuple=std::tuple<const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata>
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-matchers.h(747): note: see reference to function template instantiation 'void testing::internal::TuplePrefix<1>::ExplainMatchFailuresTo<MatcherTuple,ValueTuple>(const MatcherTuple &,const ValueTuple &,std::ostream *)' being compiled
with
[
MatcherTuple=std::tuple<testing::Matcher<const page_load_metrics::PageLoadTiming &>,testing::Matcher<page_load_metrics::PageLoadMetadata>>,
ValueTuple=std::tuple<const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata>
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-matchers.h(814): note: see reference to function template instantiation 'void testing::internal::TuplePrefix<2>::ExplainMatchFailuresTo<MatcherTuple,ValueTuple>(const MatcherTuple &,const ValueTuple &,std::ostream *)' being compiled
with
[
MatcherTuple=std::tuple<testing::Matcher<const page_load_metrics::PageLoadTiming &>,testing::Matcher<page_load_metrics::PageLoadMetadata>>,
ValueTuple=std::tuple<const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata>
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-matchers.h(813): note: see reference to function template instantiation 'void testing::internal::TuplePrefix<2>::ExplainMatchFailuresTo<MatcherTuple,ValueTuple>(const MatcherTuple &,const ValueTuple &,std::ostream *)' being compiled
with
[
MatcherTuple=std::tuple<testing::Matcher<const page_load_metrics::PageLoadTiming &>,testing::Matcher<page_load_metrics::PageLoadMetadata>>,
ValueTuple=std::tuple<const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata>
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-spec-builders.h(1117): note: see reference to function template instantiation 'void testing::internal::ExplainMatchFailureTupleTo<std::tuple<testing::Matcher<A1>,testing::Matcher<A2>>,std::tuple<A1,A2>>(const MatcherTuple &,const ValueTuple &,std::ostream *)' being compiled
with
[
A1=const page_load_metrics::PageLoadTiming &,
A2=page_load_metrics::PageLoadMetadata,
MatcherTuple=std::tuple<testing::Matcher<const page_load_metrics::PageLoadTiming &>,testing::Matcher<page_load_metrics::PageLoadMetadata>>,
ValueTuple=std::tuple<const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata>
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-spec-builders.h(1109): note: while compiling class template member function 'void testing::internal::TypedExpectation<F>::ExplainMatchResultTo(const std::tuple<A1,A2> &,std::ostream *) const'
with
[
F=void (const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata),
A1=const page_load_metrics::PageLoadTiming &,
A2=page_load_metrics::PageLoadMetadata
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-spec-builders.h(1763): note: see reference to function template instantiation 'void testing::internal::TypedExpectation<F>::ExplainMatchResultTo(const std::tuple<A1,A2> &,std::ostream *) const' being compiled
with
[
F=void (const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata),
A1=const page_load_metrics::PageLoadTiming &,
A2=page_load_metrics::PageLoadMetadata
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-spec-builders.h(1696): note: see reference to class template instantiation 'testing::internal::TypedExpectation<F>' being compiled
with
[
F=void (const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata)
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-spec-builders.h(1683): note: while compiling class template member function 'const testing::internal::ExpectationBase *testing::internal::FunctionMockerBase<R (A1,A2)>::UntypedFindMatchingExpectation(const void *,const void **,bool *,std::ostream *,std::ostream *)'
with
[
R=void,
A1=const page_load_metrics::PageLoadTiming &,
A2=page_load_metrics::PageLoadMetadata
]
e:\b\build\slave\win\build\src\testing\gmock\include\gmock\gmock-generated-function-mockers.h(107): note: see reference to class template instantiation 'testing::internal::FunctionMockerBase<R (A1,A2)>' being compiled
with
[
R=void,
A1=const page_load_metrics::PageLoadTiming &,
A2=page_load_metrics::PageLoadMetadata
]
e:\b\build\slave\win\build\src\components\page_load_metrics\renderer\page_timing_metrics_sender_unittest.cc(34): note: see reference to class template instantiation 'testing::internal::FunctionMocker<void (const page_load_metrics::PageLoadTiming &,page_load_metrics::PageLoadMetadata)>' being compiled