https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127493
--- Comment #1 from Ivan Lazaric <ivan.lazaric.gcc at gmail dot com> --- My second snippet is probably a bug in me, if file_name is wrapped with a string_view() it works. I think first snippet still stands as a bug though.
