From: Tudor Bosman Date: Wed, 2 Dec 2015 16:57:22 +0000 (-0800) Subject: Add Optional::value_type X-Git-Tag: deprecate-dynamic-initializer~213 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d93a791305d7b323ad5061783ffc850f179b1c40;p=folly.git 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 --- diff --git a/folly/Optional.h b/folly/Optional.h index 84f5d443..18320090 100644 --- a/folly/Optional.h +++ b/folly/Optional.h @@ -91,6 +91,8 @@ class OptionalEmptyException : public std::runtime_error { template class Optional { public: + typedef Value value_type; + static_assert(!std::is_reference::value, "Optional may not be used with reference types"); static_assert(!std::is_abstract::value,