Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. typedef std::basic_string<unsigned char> ustring;

typedef std::basic_string<unsigned char> ustring;

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 139 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    apparently this functionality has been removed?

    it had been working up until i must have upgraded my compiler or something. using clang ARM 64bit on mac (Qt Creator)

    anyone have a drop-in replacement?

    Christian EhrlicherC 1 Reply Last reply
    0
    • D davecotter

      apparently this functionality has been removed?

      it had been working up until i must have upgraded my compiler or something. using clang ARM 64bit on mac (Qt Creator)

      anyone have a drop-in replacement?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @davecotter said in typedef std::basic_string<unsigned char> ustring;:

      anyone have a drop-in replacement?

      For what? The typedef for ustring? What's the relation to Qt here? std::basic_string is a standard c++ class. You can also add this typedef by yourself if you really need it for some reason. Also take a look at e.g. here: https://stackoverflow.com/questions/8400896/ustring-an-inplace-replacement-of-stdstring-stdwstring

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • D Offline
        D Offline
        davecotter
        wrote on last edited by davecotter
        #3

        for what?

        because i had been using it in my QT project, and now it fails to work, and i do not have the code for it, and my attempts (many hours) have failed

        the typedef for ustring?

        yes

        What's the relation to Qt here?

        only that i've been using Qt, and thought i'd ask here

        You can ... add this typedef by yourself

        i tried but char_traits<unsigned char> doesn't compile any more. it did last week. but not today. the only thing i thought i did different was upgrade Qt

        take a look at e.g. here

        well that doesn't provide the code i need, so not useful

        they say i could do typedef std::basic_string<char8_t> ustring;, but i'm on C++11 and that would require C++20

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          As it's a removed c++ feature (or bug?) there is no relation to Qt. Fix your code to use e.g. std::vector<uchar> or QByteArray instead.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved