projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4140f48
)
Add Optional::value_type
author
Tudor Bosman
<tudorb@fb.com>
Wed, 2 Dec 2015 16:57:22 +0000
(08:57 -0800)
committer
facebook-github-bot-0
<folly-bot@fb.com>
Wed, 2 Dec 2015 17:20:21 +0000
(09:20 -0800)
Summary: Comes in handy, and std::experimental::optional has it.
Reviewed By: yfeldblum
Differential Revision:
D2708324
fb-gh-sync-id:
87cdf2449f356d3baf9fb56a608e9c43d8fe79ae
folly/Optional.h
patch
|
blob
|
history
diff --git
a/folly/Optional.h
b/folly/Optional.h
index 84f5d4439ea1300efda80d342ff5b35009dade31..1832009054bb3a42ea71981837083dc20f7e15d7 100644
(file)
--- a/
folly/Optional.h
+++ b/
folly/Optional.h
@@
-91,6
+91,8
@@
class OptionalEmptyException : public std::runtime_error {
template<class Value>
class Optional {
public:
+ typedef Value value_type;
+
static_assert(!std::is_reference<Value>::value,
"Optional may not be used with reference types");
static_assert(!std::is_abstract<Value>::value,