Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8896

ROOT's string_view cannot be <<'ed to std::cout

    XMLWordPrintable

    Details

      Description

      To reproduce, one can try to print a std::string_view from the root prompt:

      cern762:~$ root -l
      root [0] std::string_view s("asd")
      (std::string_view &) "asd"[3]
      root [1] std::cout << s
      In file included from /home/eguiraud/ROOT/root_build/input_line_12:21:
      In file included from /home/eguiraud/ROOT/root_build/etc/dictpch/allHeaders.h:258:
      In file included from /home/eguiraud/ROOT/root_build/include/TPyROOTApplication.h:16:
      In file included from /home/eguiraud/ROOT/root_build/include/TApplication.h:30:
      In file included from /home/eguiraud/ROOT/root_build/include/TQObject.h:41:
      In file included from /home/eguiraud/ROOT/root_build/include/TList.h:25:
      In file included from /home/eguiraud/ROOT/root_build/include/TSeqCollection.h:25:
      In file included from /home/eguiraud/ROOT/root_build/include/TCollection.h:29:
      In file included from /home/eguiraud/ROOT/root_build/include/TString.h:28:
      In file included from /home/eguiraud/ROOT/root_build/include/RStringView.h:26:
      /home/eguiraud/ROOT/root_build/include/RWrap_libcpp_string_view.h:156:17: error: use of undeclared identifier '__pad_and_output'
                  if (__pad_and_output(_Ip(__os),
                      ^
      /home/eguiraud/ROOT/root_build/include/libcpp_string_view.h:776:23: note: in instantiation of function template specialization 'std::__ROOT::R__put_character_sequence<char, std::char_traits<char> >' requested here
              return _VSTD::R__put_character_sequence(__os, __sv.data(), __sv.size());
                            ^
      ROOT_prompt_1:1:11: note: in instantiation of function template specialization 'std::experimental::__ROOT::operator<<<char, std::char_traits<char> >' requested here
      std::cout << s
                ^
      root [2] 

        Attachments

          Activity

            People

            Assignee:
            pcanal Philippe Canal
            Reporter:
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: