www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What is the equivalent of C++'s std::optional<T> and std::nullopt in

reply helxi <brucewayneshit gmail.com> writes:
For reference: https://en.cppreference.com/w/cpp/utility/optional
Apr 02 2018
next sibling parent Uknown <sireeshkodali1 gmail.com> writes:
On Tuesday, 3 April 2018 at 02:10:09 UTC, helxi wrote:
 For reference: 
 https://en.cppreference.com/w/cpp/utility/optional
Nullable!T would be the closest thing: https://dlang.org/phobos/std_typecons.html#Nullable I'm not sure how comparable they are though.
Apr 02 2018
prev sibling parent Timoses <timosesu gmail.com> writes:
On Tuesday, 3 April 2018 at 02:10:09 UTC, helxi wrote:
 For reference: 
 https://en.cppreference.com/w/cpp/utility/optional
See also this topic recently discussed: https://forum.dlang.org/post/p9qvb8$1j1n$1 digitalmars.com
Apr 03 2018