Bug 160618 - WTF needs a variant implementation
Summary: WTF needs a variant implementation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-05 16:18 PDT by Sam Weinig
Modified: 2016-08-07 09:58 PDT (History)
2 users (show)

See Also:


Attachments
Patch (82.24 KB, patch)
2016-08-05 17:30 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (82.65 KB, patch)
2016-08-05 19:10 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.