Skip to content
Snippets Groups Projects

[bugfix] fix typo decay_t --> decay

Closed Robert K requested to merge feature/make-typetraits-compile into master

Otherwise this file does not compile with gcc 4.9.1.

Merge request reports

Pipeline #427 failed

Pipeline failed for 805b6210 on feature/make-typetraits-compile

Closed by avatar (Mar 9, 2025 10:16pm UTC)

Merge details

  • The changes were not merged into .

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • This this really the right fix? std::decay_t<T> unlike std::decay<T> requires not just C++11 but C++14.

    The C++11 analogue would be typename decay<T>::type. From a quick glance, I would expect that to be the proper replacement here.

  • For some reason there was a problem with the std=c++14 detection. However, this means DUNE cannot be compiled with c++14 support. I was not aware of that. Seems to be quite a tough constraint.

  • Some time ago there was a problem that the compiler used the libstdcxx from an older compiler. That's the reason why we test for compiler support of C++14 and the same for the library. If one fails, we fall back to C++11.

    I think the proper fix is to error out when the required C++14 is not working. Then people have to fix their compiler. At least this would accord to our decision to allow usage of all C++14 features GCC 4.9 supports.

    I'll prepare a merge request to require C++14.

  • On desktop systems these issues never occur. It's when you move your code to a parallel computer, over engineered things like typetraits.hh start to go wrong. Then fixing the compile is most of the time not an option and you have to live with what's there. Adding -std=c++14 seems to work. So the test is "wrong" in that case.

  • Can you provide the related output from CMake?

    Adding -std=c++14 might currently work for the compiler features, but people will start using c++14 library features, too.

    Fixing the compiler would mean to tell the compiler to use the right library. I never did it myself, but I still hear Steffen grumbling :wink:

  • Robert K Status changed to closed

    Status changed to closed

Please register or sign in to reply
Loading