std::gslice...::operator=(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… std::gslice...::operator=(3) πŸ’…

okay bestie, this page is from the C++ Standard Libary (yes, that's literally how the header spells it, and we respect the lore). It's the manual page for std::gslice_array::operator=, and it's all about assigning values to the referred elements. Very "you get a value, you get a value" energy. 🫢


✨ NAME ✨

std::gslice_array::operator= - std::gslice_array::operator=

That's the name, bestie β€” twice, because that's what the page says. No notes. πŸ’…


🌸 Synopsis 🌸

void operator=( const T& value ) const;
(1)
void operator=( const std::valarray<T>& val_arr ) const;
(2)
const gslice_array& operator=( const gslice_array& other_arr ) const;
(3)

Assigns values to all referred elements. Iconic behavior, honestly. ✨

  1. Assigns value to all of the elements.
  2. Assigns the elements of val_arr to the referred to elements of *this.
  3. Assigns the selected elements from other_arr to the referred to elements of *this.

πŸŽ€ Parameters πŸŽ€

  • value β€” a value to assign to all of the referred elements
  • val_arr β€” std::valarray to assign
  • other_arr β€” std::gslice_array to assign

πŸ’– Return value πŸ’–

  • 1,2) β€” (none)
  • 3) β€” *this

πŸ¦‹ Example πŸ¦‹

This section is incomplete.

Reason: no example.

Not me crying over a missing example 😭 but that's what it says.


πŸ”₯ Defect reports πŸ”₯

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

  • LWG 123 β€” applied to C++98. Behavior as published: overload (2) was non-const. Correct behavior: made const.
  • LWG 253 β€” applied to C++98. Behavior as published: the copy assignment operator was private. Correct behavior: made public.
  • LWG 621 β€” applied to C++98. Behavior as published: the copy assignment operator was non-const. Correct behavior: made const.

πŸ‘‘ Category πŸ‘‘

  • * Todo no example

That's the category tag, bestie β€” not me adding a little todo. The page says what it says. πŸ’€


Mwah πŸ’‹ this page is served fresh from http://cppreference.com, dated 2024.06.10, and it's the std::gslice...::operator=(3) page. Go assign those referred elements, bestie! 🫢✨

πŸ“¦ where this page comes from