Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-19086

CLang Code Model fails to parse type_traits header with -std=c++17 gcc flag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 4.4.1
    • None
    • Qt Creator 4.4.1
      Based on Qt 5.9.2 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
      Built on Oct 4 2017 04:14:10

      QT Version 5.9.2

      gcc version 7.2.1 20170915

      Clang Code Model fails to parse type_traits header with c++17 support enabled.
      Error: type_traits:3062:7: error: expected '(' for function-style cast or type construction

      Lines causing error in type_traits

      #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
      # define __cpp_lib_has_unique_object_representations 201606
        /// has_unique_object_representations
        template<typename _Tp>
          struct has_unique_object_representations
          : bool_constant<__has_unique_object_representations(
            remove_cv_t<remove_all_extents_t<_Tp>>
            )> //LINE 3062
          { };
      #endif
      #undef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
      

      Code that reproduces error:

      #include <QAudioFormat>
      #include <optional>
      
      class IAudioFormatNegotiator
      {
      public:
          virtual ~IAudioFormatNegotiator();
          virtual std::optional<QAudioFormat> negotiateFormat() = 0;
      };
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kosjar Nikolai Kosjar
            nwinterer Nick Winterer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes