You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/SOURCES/brandversion-construct.patch

36 lines
2.2 KiB

Add a missing constructor for BrandVersion; otherwise, we get build
errors:
In file included from ../../chrome/test/chromedriver/capabilities.cc:5:
In file included from ../../chrome/test/chromedriver/capabilities.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/map:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tree.h:67:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/alloc_traits.h:34:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:518:4: error: no matching function for call to 'construct_at'
std::construct_at(__p, std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:117:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<BrandVersion>>::construct<BrandVersion, const std::basic_string<char> &, const std::basic_string<char> &>' requested here
_Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
^
../../chrome/test/chromedriver/capabilities.cc:358:16: note: in instantiation of function template specialization 'std::vector<BrandVersion>::emplace_back<const std::basic_string<char> &, const std::basic_string<char> &>' requested here
brands.emplace_back(*brand, *version);
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:94:5: note: candidate template ignored: substitution failure [with _Tp = BrandVersion, _Args = <const std::basic_string<char> &, const std::basic_string<char> &>]: no matching constructor for initialization of 'BrandVersion'
construct_at(_Tp* __location, _Args&&... __args)
^
1 error generated.
--- a/chrome/test/chromedriver/chrome/client_hints.h
+++ b/chrome/test/chromedriver/chrome/client_hints.h
@@ -18,6 +18,8 @@ struct BrandVersion {
// * "major version" for "brands",
// * "full version" for "fullVersionList".
std::string version;
+
+ BrandVersion(const std::string& b, const std::string& v) : brand(b), version(v) { }
};
// User-Agent Client Hints