Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

switch to std::experimental::optional #3616

Merged
merged 1 commit into from
Jan 20, 2016
Merged

Conversation

jfirebaugh
Copy link
Contributor

std::experimental::optional is likely to become a non-experimental part of the standard library in the next revision, and is more complete than our mapbox/variant-based implementation. It's supported by gcc 4.9 and clang 3.5; need to check on iOS/OS X.

For brevity, I recommend we define mbgl/util/optional.hpp:

#include <experimental/optional>

namespace mbgl {
using optional = std::experimental::optional;
}

And then use unqualified optional<T> wherever needed in the mbgl namespace.

@jfirebaugh jfirebaugh force-pushed the experimental-optional branch from 7348ab2 to 9b62661 Compare January 20, 2016 01:56
@jfirebaugh jfirebaugh merged commit 9b62661 into master Jan 20, 2016
@jfirebaugh jfirebaugh deleted the experimental-optional branch January 20, 2016 01:59
@kkaefer
Copy link
Member

kkaefer commented Jan 20, 2016

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants