Bug 160618

Summary: WTF needs a variant implementation
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Sam Weinig 2016-08-05 16:18:41 PDT
WTF needs a variant implementation
Comment 1 Sam Weinig 2016-08-05 17:30:37 PDT
Created attachment 285468 [details]
Patch
Comment 2 Sam Weinig 2016-08-05 19:10:40 PDT
Created attachment 285473 [details]
Patch
Comment 3 Alex Christensen 2016-08-05 19:54:19 PDT
Comment on attachment 285473 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=285473&action=review

Sweeeeet!

> Tools/TestWebKitAPI/Tests/WTF/Variant.cpp:47
> +    typedef std::experimental::variant<int, float, String> Variant;

Do we want to type std::experimental::variant every time we use this in WebKit, or do we want to put this line in the header?
Comment 4 Sam Weinig 2016-08-05 20:18:05 PDT
(In reply to comment #3)
> Comment on attachment 285473 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=285473&action=review
> 
> Sweeeeet!
> 
> > Tools/TestWebKitAPI/Tests/WTF/Variant.cpp:47
> > +    typedef std::experimental::variant<int, float, String> Variant;
> 
> Do we want to type std::experimental::variant every time we use this in
> WebKit, or do we want to put this line in the header?

I think for now we want to type it. As I start using it, if it becomes annoying, I will consider adding something like:

namespace WTF {

template<typename ... Types>
using Variant = std::experimental::variant<Types>;

}

But I want to see first.
Comment 5 WebKit Commit Bot 2016-08-06 09:02:45 PDT
Comment on attachment 285473 [details]
Patch

Clearing flags on attachment: 285473

Committed r204227: <http://trac.webkit.org/changeset/204227>
Comment 6 WebKit Commit Bot 2016-08-06 09:02:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Darin Adler 2016-08-07 09:58:24 PDT
The failures in bug 160638 make it seem likely this is not quite working yet in the compilers used on the GTK and Windows bots.