http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020
--- Comment #16 from __vic <d.v.a at ngs dot ru> 2011-05-18 09:55:34 UTC ---
Initial problem is that the following standard-conforming code is not compiled
by GCC.
#include<cstring>
template<class Iter>
void f(Iter i1, Iter i2)
{
}
int main()
{
const char *st = "abc";
f(st, std::strchr(st, '\0'));
}
Yes, workaround is obvious: add the const_cast to the return value. But is
there a way to do without it?
