|
Boost : |
Subject: Re: [boost] boost::optional<void>
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2010-03-01 05:24:25
Daniel Larimer skrev:
> I am writing some generic code and would like to handle "all values" the same way; however, I keep running into the problem of return void return types that need "special treatment". There is nothing I can do about it most of the time except template specialization.
>
> That said, it would be helpful if boost::optional<void> could have some sensible default implementation where it acts more or less like a boolean. As it is, I will probably provide my own specialization of boost::optional to simplify my templates.
>
> Any thoughts on this?
Could you give some concrete examples of your problems? Otherwise it's
hard to comment.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk