Title
simd::basic_vec(U&&) default template parameter
Status
new
Section
[simd.ctor]
Submitter
Hewill Kang

Created on 2025-09-29.00:00:00 last changed 1 week ago

Messages

Date: 2025-10-03.13:44:03

Proposed resolution:

This wording is relative to N5014.

  1. Modify [simd.overview] as indicated:

    namespace std::simd {
      template<class T, class Abi> class basic_vec {
      public:
        […]
        template<class U = T>
          constexpr explicit(see below) basic_vec(U&& value) noexcept;
        […]
      };
    }
    
  2. Modify [simd.ctor] as indicated:

    template<class U = T> constexpr explicit(see below) basic_vec(U&& value) noexcept;
    

    -1- […]

Date: 2025-09-29.00:00:00

simd::basic_vec supports complex after P2663R7, defaulting the template parameter of its broadcast constructor seems to be reasonable, as this allows the intuitive spelling:

simd::vec<complex<double>> sc1   ({-1.0, 0.5}); // current ill-formed
simd::vec<complex<double>> sc2 = {{-1.0, 0.5}}; // current ill-formed
History
Date User Action Args
2025-10-03 13:44:03adminsetmessages: + msg15098
2025-09-29 00:00:00admincreate