Boost logo

Boost Users :

Subject: [Boost-users] [Optional] Lazy initialized optional
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2018-11-13 17:14:10


I am looking into deriving from boost::optional and adding lazy
initialization capability.

I can arrange a constructor, or whatever, to inject an appropriate
factory method, functional callback, etc, that's no problem.

>From the boost::optional perspective, I'd like to override a key
method (or methods, hopefully not too many) in order to inject that
factory provided value. I'm thinking optional::get?

Unless there's a better override for that?


Michael Powell

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at