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. Qt 6.0: error: no template named 'auto_ptr' in namespace 'std'. Why?
Forum Update on Monday, May 27th 2025

Qt 6.0: error: no template named 'auto_ptr' in namespace 'std'. Why?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 4.5k 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.
  • B Offline
    B Offline
    bogong
    wrote on 12 Dec 2020, 10:54 last edited by bogong 12 Dec 2020, 10:56
    #1

    Hello all!

    I am trying to build simple application with Qt 6.0 for MacOS and got this error:

    error: no template named 'auto_ptr' in namespace 'std'
    

    Why is that?
    For Qt 5.15.2 all is working perfectly.
    This application contain Boost. Is there any way to use C++11 in Qt 6.0?

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 12 Dec 2020, 10:58 last edited by
      #2

      std::auto_ptr was deprecated with c++11 and removed with c++17. So it looks like you're compiling with c++17. And I'm pretty sure boost removed this a long time ago so update your boost libs.

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

      B 1 Reply Last reply 12 Dec 2020, 15:52
      3
      • C Christian Ehrlicher
        12 Dec 2020, 10:58

        std::auto_ptr was deprecated with c++11 and removed with c++17. So it looks like you're compiling with c++17. And I'm pretty sure boost removed this a long time ago so update your boost libs.

        B Offline
        B Offline
        bogong
        wrote on 12 Dec 2020, 15:52 last edited by bogong 12 Dec 2020, 16:36
        #3

        @Christian-Ehrlicher I am not a very-boost person. Do you know which parameter should be supplied for building C++17? For now I've got fail in building boost for C++17. I am using Boost 1.62.0 I haven't found any option to build it with C++17. Only Boost 1.68.0 and higher can be built with C++17.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bogong
          wrote on 12 Dec 2020, 16:37 last edited by
          #4

          Issue closed. Solution found - update Boost for 1.68.0 or higher version.

          C 1 Reply Last reply 12 Dec 2020, 16:47
          0
          • B bogong
            12 Dec 2020, 16:37

            Issue closed. Solution found - update Boost for 1.68.0 or higher version.

            C Online
            C Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 12 Dec 2020, 16:47 last edited by
            #5

            @bogong said in Qt 6.0: error: no template named 'auto_ptr' in namespace 'std'. Why?:

            update Boost for 1.68.0 or higher version.

            As I told you before:

            so update your boost libs.

            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
            • J JonB referenced this topic on 24 Apr 2023, 13:43

            1/5

            12 Dec 2020, 10:54

            • Login

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