deductiongu...td::valarray(3)
π NAME π
okay so bestie, welcome to the deductiongu...td::valarray(3) page from the C++ Standard Libary β yes, thatβs the whole vibe. This one is literally about deduction guides for std::valarray. β¨
πΈ Synopsis πΈ
Defined in header <valarray>:
template< typename T, std::size_t cnt > (since C++17)
valarray( const T(&)[cnt], std::size_t ) -> valarray<T>;
This deduction guide is provided for std::valarray to allow deduction from array and size β and yes, bestie, note that deduction from pointer and size is covered by the implicit guides. no cap. π«Ά
π Example π
// Run this code
#include <iostream>
#include <valarray>
int main()
{
int a[] = {1, 2, 3, 4};
std::valarray va(a, 3); // uses explicit deduction guide
for (int x : va)
std::cout << x << ' ';
std::cout << '\n';
}
π Output π
1 2 3
and thatβs the whole iconic little page, bestie π β source/version/date check: http://cppreference.com, 2024.06.10, and the page title was deductiongu...td::valarray(3). periodt. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms