projects
/
platform
/
upstream
/
VK-GL-CTS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80f9d09
)
Add tcu::just() that wraps argument in to tcu::Maybe.
author
Mika Isojärvi
<misojarvi@google.com>
Fri, 13 Feb 2015 20:48:55 +0000
(12:48 -0800)
committer
Mika Isojärvi
<misojarvi@google.com>
Tue, 17 Feb 2015 21:52:06 +0000
(13:52 -0800)
Sometimes relying on implicit conversions is not enough and writing
complete constructor of tcu::Maybe<T> is tedious.
Change-Id: I945ada922e6507152f30109773425401cefd54a3
framework/common/tcuMaybe.hpp
patch
|
blob
|
history
diff --git
a/framework/common/tcuMaybe.hpp
b/framework/common/tcuMaybe.hpp
index
62110a9
..
135486d
100644
(file)
--- a/
framework/common/tcuMaybe.hpp
+++ b/
framework/common/tcuMaybe.hpp
@@
-66,6
+66,12
@@
Maybe<T> nothing (void)
}
template<typename T>
+Maybe<T> just (const T& value)
+{
+ return Maybe<T>(value);
+}
+
+template<typename T>
Maybe<T>::Maybe (void)
: m_ptr (DE_NULL)
{