2015-04-08 23:31 GMT+02:00 Jakob Riedle
Hello boost community,
since this seems to me kind of a proving ground for new C++ library/language features I'd ask this question here.
Would you recon' writing a language proposal about:
using the 'default'-keyword as some standard way of calling the default ctor of variables.
I could imagine the following use-case:
void foo( some::very_long_name
arg = default ){ return;
}
This would make things shorter, in the way 'auto' does it for types.
You could also do it for passing parameters:
foo( default );
This could interact very well with boost::optional, make it more intuitive and easier to use:
optional<int> bar( optional
arg = default ){ return default;
}
bar( default );
For the particular case of std::experimental::optional, you can use the
brace notation:
optional<int> bar( optional