optional.hpp: Allow easy access to contained type
This commit is contained in:
parent
83b4de067a
commit
38419164b6
1 changed files with 3 additions and 1 deletions
|
|
@ -18,9 +18,11 @@ namespace fc {
|
||||||
* fc::optional adds less than 400.
|
* fc::optional adds less than 400.
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class optional
|
class optional
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef T value_type;
|
||||||
|
|
||||||
optional():_valid(false){}
|
optional():_valid(false){}
|
||||||
~optional(){ reset(); }
|
~optional(){ reset(); }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue