Eric Friedman wrote: > Ed Brey wrote: >> Please consider incorporating a "blank" type. This idea >> would be to allow the equivalent of "void" to be added to the >> type list. boost::blank (or whatever it would be called) >> would be meet BoundedType concept, but otherwise do nothing. >> The empty function would return true if a blank is currently stored. > > This is an interesting idea. It may even be possible to implement > variant to detect a void type so that the following would be allowed: > > variant< T1, ... void, ... Tn > > > In the case of a variant "containing" void, empty() would return true, > and visitation would be undefined. > > I'd be interested if others have opinions on this issue.
Supporting void as the first argument would also allow variants where none of the types is DefaultConstructible. It is possible to fake that with struct void_t {}; of course, but special-casing void may be clearer. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost