STD::GSLICE_ARRAY(3)

πŸ’– std::gslice_array< _Tp > β€” Library Functions Manual (section 3, bestie) πŸ’–

okay so. this is a page from the Library Functions Manual, section 3, and it's all about std::gslice_array< _Tp >. it's a C++ thing. it's giving "i'm a reference and i know it". let's go πŸ¦‹


✨ NAME ✨

std::gslice_array< _Tp > β€” a reference to a multi-dimensional subset of an array. that's it. that's the whole job. iconic behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

first things first, you gotta let it in:

#include <valarray>

πŸŽ€ Public Types πŸŽ€

  • typedef _Tp value_type β€” yeah. the value type is _Tp. it said what it said πŸ’…

🫢 Public Member Functions 🫢

  • gslice_array (const gslice_array &) β€” copy constructor, bestie. both slices end up referring to the same underlying array. no cap, they're literally sharing. don't be weird about it.
  • template<class _Dom> void operator%= (const _Expr< _Dom, _Tp > &) const
  • void operator%= (const valarray< _Tp > &) const β€” modulo the slice elements by the corresponding elements of v. math girl summer ✨
  • template<class _Dom> void operator&= (const _Expr< _Dom, _Tp > &) const
  • void operator&= (const valarray< _Tp > &) const β€” logical and the slice elements with the corresponding elements of v.
  • template<class _Dom> void operator*= (const _Expr< _Dom, _Tp > &) const
  • void operator*= (const valarray< _Tp > &) const β€” multiply the slice elements by the corresponding elements of v.
  • template<class _Dom> void operator+= (const _Expr< _Dom, _Tp > &) const
  • void operator+= (const valarray< _Tp > &) const β€” add the corresponding elements of v to the slice elements.
  • template<class _Dom> void operator-= (const _Expr< _Dom, _Tp > &) const
  • void operator-= (const valarray< _Tp > &) const β€” subtract the corresponding elements of v from the slice elements.
  • template<class _Dom> void operator/= (const _Expr< _Dom, _Tp > &) const
  • void operator/= (const valarray< _Tp > &) const β€” divide the slice elements by the corresponding elements of v.
  • template<class _Dom> void operator<<= (const _Expr< _Dom, _Tp > &) const
  • void operator<<= (const valarray< _Tp > &) const β€” left shift the slice elements by the corresponding elements of v.
  • template<class _Dom> void operator= (const _Expr< _Dom, _Tp > &) const
  • void operator= (const _Tp &) const β€” assign all the slice elements to t. all of them. every single one. periodt.
  • gslice_array & operator= (const gslice_array &) β€” assignment operator πŸ’« it assigns the slice elements to the corresponding elements of a.
  • void operator= (const valarray< _Tp > &) const β€” assign the slice elements to the corresponding elements of v.
  • template<class _Dom> void operator>>= (const _Expr< _Dom, _Tp > &) const
  • void operator>>= (const valarray< _Tp > &) const β€” right shift the slice elements by the corresponding elements of v.
  • template<class _Dom> void operator^= (const _Expr< _Dom, _Tp > &) const
  • void operator^= (const valarray< _Tp > &) const β€” logical xor the slice elements with the corresponding elements of v.
  • template<class _Dom> void operator|= (const _Expr< _Dom, _Tp > &) const
  • void operator|= (const valarray< _Tp > &) const β€” logical or the slice elements with the corresponding elements of v.

πŸ’œ Friends πŸ’œ

  • class valarray< _Tp > β€” yeah they're friends. mutuals. 🀝

πŸ”₯ Detailed Description πŸ”₯

template<typename _Tp>
class std::gslice_array< _Tp >

"Reference to multi-dimensional subset of an array."

so here's the tea β˜• a gslice_array is a reference to the actual elements of an array that got specified by a gslice. the way you get one is by calling operator[](gslice) on a valarray. and then?? the gslice_array you get back lets you carry operations out on the referenced subset of elements in the original valarray. like for example, operator+=(valarray) will add values to the subset of elements in the underlying valarray that this gslice_array refers to. it's literally reaching into the original array and doing stuff. main character energy fr fr πŸ”₯

🌈 Parameters 🌈

  • Tp β€” element type. that's it. that's the parameter. πŸ’–

πŸ’… Member Function Documentation πŸ’…

  • template<typename _Tp> void std::gslice_array< _Tp >::operator%= (const valarray< _Tp > & ) const β€” modulo slice elements by corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator&= (const valarray< _Tp > & ) const β€” logical and slice elements with corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator*= (const valarray< _Tp > & ) const β€” multiply slice elements by corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator+= (const valarray< _Tp > & ) const β€” add corresponding elements of v to slice elements.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator-= (const valarray< _Tp > & ) const β€” subtract corresponding elements of v from slice elements.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator/= (const valarray< _Tp > & ) const β€” divide slice elements by corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator<<= (const valarray< _Tp > & ) const β€” left shift slice elements by corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator>>= (const valarray< _Tp > & ) const β€” right shift slice elements by corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator^= (const valarray< _Tp > & ) const β€” logical xor slice elements with corresponding elements of v.
  • template<typename _Tp> void std::gslice_array< _Tp >::operator|= (const valarray< _Tp > & ) const β€” logical or slice elements with corresponding elements of v.

🧚 Author 🧚

Generated automatically by Doxygen for libstdc++ from the source code. so like… a robot wrote this, not me, i just did the glow-up πŸ’…


and that's the whole page, bestie 🫢 shoutout to libstdc++ for the source and version, and to Doxygen for generating it β€” std::gslice_array< _Tp >(3) out. slay, stay safe, and remember: it's a reference, not a copy. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms