最終更新日時(UTC):
が更新

履歴 編集

function template
<linalg>

std::linalg::layout_blas_packed::mapping::operator==(C++26)

template<class OtherExtents>
friend constexpr bool
  operator==(const mapping& x, const mapping<OtherExtents>& y) noexcept;

//operator==により、以下のオーバーロードが使用可能になる        
template<class OtherExtents>
friend constexpr bool
  operator!=(const mapping& x, const mapping<OtherExtents>& y) noexcept;

概要

mappingの等値比較を行う。

戻り値

x.extents() == y.extents()

例外

投げない

#include <cassert>
#include <mdspan>
#include <linalg>
namespace linalg = std::linalg;

int main()
{
  using LayoutPacked = linalg::layout_blas_packed<linalg::lower_triangle_t, linalg::column_major_t>;
  using Ext3x3 = std::extents<size_t, 3, 3>;
  using ExtNxN = std::dextents<size_t, 2>;
  LayoutPacked::mapping<Ext3x3> map1;
  LayoutPacked::mapping<ExtNxN> map2{ExtNxN{3, 3}};
  assert(map1 == map2);
}

出力

バージョン

言語

  • C++26

処理系

参照