1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Add "typedef T value_type;" to llvm::Optional<T>.

Inspired by std::experimental::optional from the "Library Fundamentals" C++ TS.

llvm-svn: 218617
This commit is contained in:
Jordan Rose 2014-09-29 18:56:05 +00:00
parent 8774d2cb54
commit 8e86d4e854

View File

@ -29,6 +29,8 @@ class Optional {
AlignedCharArrayUnion<T> storage;
bool hasVal;
public:
typedef T value_type;
Optional(NoneType) : hasVal(false) {}
explicit Optional() : hasVal(false) {}
Optional(const T &y) : hasVal(true) {