Commit d93a7913 authored by Tudor Bosman's avatar Tudor Bosman Committed by facebook-github-bot-0

Add Optional::value_type

Summary: Comes in handy, and std::experimental::optional has it.

Reviewed By: yfeldblum

Differential Revision: D2708324

fb-gh-sync-id: 87cdf2449f356d3baf9fb56a608e9c43d8fe79ae
parent 4140f483
...@@ -91,6 +91,8 @@ class OptionalEmptyException : public std::runtime_error { ...@@ -91,6 +91,8 @@ class OptionalEmptyException : public std::runtime_error {
template<class Value> template<class Value>
class Optional { class Optional {
public: public:
typedef Value value_type;
static_assert(!std::is_reference<Value>::value, static_assert(!std::is_reference<Value>::value,
"Optional may not be used with reference types"); "Optional may not be used with reference types");
static_assert(!std::is_abstract<Value>::value, static_assert(!std::is_abstract<Value>::value,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment