Skip to content

Add constexpr, test for C++14 constexpr.

Reference issue

What does this implement/fix?

This is the next split-off from !881. It adds the C++14 parts of the patch which allows constexpr initialization of Maps from static constexpr memory and some of the basic operations (including, to my surprise, my memory is a sieve) addition and subtraction.

I included a testcase which is the testcase in !881 with the C++20 parts reduced to empty placeholders.

Edit: this is done. I realize now that I forgot to follow up on @cantonios comment re destructors ("Whatever we do for NVCC, we probably also need to do for HIP as well."), so I'll have to leave this as a draft until I can review what that implies. Edit: I think #if defined(EIGEN_GPUCC) should be the right thing.

Compared to the version in !881 this re-instates (I think) all the inline keywords that I had removed when adding constexpr.

Additional information

Edited by Tobias Schlüter

Merge request reports