summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/picture/picture.cpp
diff options
context:
space:
mode:
authorMichał Łoś <michal.los@siili.com>2024-05-08 14:08:42 +0200
committerMichał Łoś <michal.los@siili.com>2024-05-10 18:20:28 +0000
commitced943e936e335a16e9b479a2010e5bbee1af4f1 (patch)
treeedb7f1b6760d5cbd376a71f2add31d0a65b6ac50 /doc/src/snippets/picture/picture.cpp
parenta4341827ac17c14541ea69c67c76aaae5a09ddcc (diff)
Add compilation test instead of VxWorks checkHEADdev
`<future>` is explicitly excluded for VxWork, because enabling it causes compilation error when building tests (and causes some serious issues when trying to naively work-arond this compilation problem). When forcing `QT_FEATURE_cxx11_future` on VxWorks, failure occurs: ``` qtbase/src/corelib/thread/qthread.h:125:19: error: no matching function for call to 'invoke' 125 | (void)std::invoke(std::move(f), std::forward<decltype(largs)>(largs)...); | ^~~~~~~~~~~ [...] qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:45: note: in instantiation of function template specialization 'QThread::create<(lambda at qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:52), QPromise<int>>' requested here 32 | QScopedPointer<QThread> thread(QThread::create([] (QPromise<int> promise) { | ^ VSB/usr/h/public/type_traits:2720:7: note: candidate template ignored: substitution failure [with _Callable = remove_reference_t<(lambda at qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:52) &>, _Types = <QPromise<int> &>]: no matching function for call to '_Call' 2720 | auto invoke(_Callable&& _Obj, _Types&&... _Args) noexcept(noexcept(_Invoker<_Callable, _Types...>::_Call( | ^ 2721 | _STD forward<_Callable>(_Obj), _STD forward<_Types>(_Args)...))) 2722 | -> decltype(_Invoker<_Callable, _Types...>::_Call( | ~~~~~~~~ ``` Instead of excluding cxx11_future on VxWorks explicitly, replace condition with actual check which should pass in non-VxWorks 24.03 (or older) standard libraries. VxWorks in version 24.03 fails this test due to std::async improperly forwards argument type to lambda, which causes compilation error when argument type is a non-copiable value type. This is a problem in VxWorks standard library, which could be fixed in future versions of this OS, so keeping this as a test should unlock `<future>` header once it's fixed. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: Ic67df9be2e95dce999689eaea146f113017ab4f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'doc/src/snippets/picture/picture.cpp')
0 files changed, 0 insertions, 0 deletions