[Webkit-unassigned] [Bug 185194] [GTK] Error building WebKitGtk+ with gcc version 7.3.1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 7 21:38:06 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=185194

--- Comment #15 from Yusuke Suzuki <utatane.tea at gmail.com> ---
(In reply to Michael Catanzaro from comment #8)
> JF, this might be a tricky one. Problem is, with --std=c++17 we must use the
> real std::optional rather than our own (fixed in bug #185159). But with,
> libstdc++ 7 std::optional does not support incomplete types. I've been
> fighting my way through the build, and most problems are fairly easy to fix
> by converting forward declarations to #includes, but now I've run into a
> circular dependency. IDBRequest.h now requires IDBIndex.h, because it uses
> std::optional<Source> with using Source = Variant<RefPtr<IDBObjectStore>,
> RefPtr<IDBIndex>, RefPtr<IDBCursor>>. But IDBIndex.h requires IDBRequest.h,
> since it uses ExceptionOr<Ref<IDBRequest>>. Forward declarations won't save
> us here: some code is going to need to be either rewritten or else seriously
> reorganized.
> 
> There was also another case (in DataTransferItemList.h) of
> std::optional<Vector<something>> where I had to replace std::optional with a
> raw pointer Vector<something>*, which was unfortunate. I fear that's
> probably going to be the way to fix IDBRequest.h, which is a shame because
> it's used in public member functions there.

Another solution is, moving the current our std::optional to WTF::optional. And use it. And in some ports, we can use official std::optional.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180508/33174d69/attachment.html>


More information about the webkit-unassigned mailing list