https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81239
--- Comment #6 from Jonny Grant <jg at jguk dot org> --- > I imagine you may have found out that this goes away if the "const" is > removed. So it becomes > void test_params(string & mystr1, string & out_str) To add, by this I mean the std:: namespace is visible, providing the parameter is not const