GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — std::simd::basic_mask::operator^ - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. simd
  3. basic_mask
  4. operator^

最終更新日時: 2026年07月31日 23時18分35秒 (JST)
Akira Takahashi が更新

履歴 編集

function
<simd>

std::simd::basic_mask::operator^(C++26)

friend constexpr basic_mask
  operator^(const basic_mask& lhs, const basic_mask& rhs) noexcept;

概要

2つのマスクの要素ごとのビット排他的論理和を求める。

戻り値

lhsとrhsに対して要素ごとにビット排他的論理和を適用した結果で初期化されたbasic_maskオブジェクトを返す。

例外

投げない。

備考

この関数はHidden friendsとして定義される。

例

#include <simd>
#include <print>

namespace simd = std::simd;

int main()
{
  simd::vec<int, 4> a = [](int i) { return i; };  // {0, 1, 2, 3}
  auto m1 = (a >= 1);                            // {false, true, true, true}
  auto m2 = (a < 3);                             // {true, true, true, false}

  auto r = m1 ^ m2;                              // {true, false, false, true}

  for (int i = 0; i < r.size(); ++i) {
    std::print("{} ", r[i]);
  }
  std::println("");
}

出力

true false false true 

バージョン

言語

  • C++26

処理系

  • Clang: 22 ❌
  • GCC: 16.1 ❌
  • Visual C++: 2026 Update 2 ❌

関連項目

  • std::simd::basic_mask::operator&
  • std::simd::basic_mask::operator|

参照

  • P1928R15 std::simd — merge data-parallel types from the Parallelism TS 2
    • C++26で追加された
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.