
4 Sep
2012
4 Sep
'12
4 a.m.
On 03/09/2012 09:08, Andrey Semashev wrote:
I realize that I can provide both result<> specializations and it will work either way. But when there are more than one argument the specializations begin to pile quickly. Consider also rvalue references and const and non-const qualified my_foo.
I have yet to find a good way to do this myself. It seems it is an issue that really needs some written best practices though, since a lot of libraries that define result appear to not to it vert well (sadly, even Phoenix is among them; it uses more specializations than necessary and simple things like result_of<F(int, int, int&)> are ill-formed).