Fixes ambiguities with operators >> and <<. Adds tests for such cases.

[SVN r73818]
This commit is contained in:
Antony Polukhin
2011-08-16 17:09:25 +00:00
parent eb66b40e67
commit 2f5d0c847b
2 changed files with 30 additions and 1 deletions
+2 -1
View File
@@ -1687,7 +1687,8 @@ namespace boost
interpreter(buf, buf + src_len);
Target result;
if(!(interpreter << arg && interpreter >> result))
// Disabling ADL, by directly specifying operators.
if(!(interpreter.operator <<(arg) && interpreter.operator >>(result)))
BOOST_LCAST_THROW_BAD_CAST(Source, Target);
return result;
}