Skip to main content

Timeline for How should one use std::optional?

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Apr 16, 2014 at 21:43 history edited utnapistim CC BY-SA 3.0
deleted 2 characters in body
May 31, 2013 at 16:42 comment added utnapistim You-re right; it was a poor example; I have modified my example for "parse first block if available".
May 31, 2013 at 16:37 history edited utnapistim CC BY-SA 3.0
addressed comment from @BenVoigt
May 31, 2013 at 16:26 comment added Ben Voigt This strikes me as a poor example, since if multiple blocks were completed only one could be returned and the rest discarded. The function should instead return a possibly-empty collection of blocks.
May 31, 2013 at 16:24 comment added utnapistim Thanks - I corrected it (I used boost::optional because after about two years of using it, it is hard-coded into my pre-frontal cortex).
May 31, 2013 at 16:21 comment added David G I know they're basically the same, but why are you using boost:: instead of std::?
May 31, 2013 at 16:19 history answered utnapistim CC BY-SA 3.0