std::extrem...distribution(3)

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

🌸 NAME 🌸

std::extreme_value_distribution::extreme_value_distribution β€” aka std::extreme_value_distribution::extreme_value_distribution, because this page really said the name twice and honestly? Iconic. We're on the std::extrem...distribution(3) page from the C++ Standard Library manual, and today's topic is the constructor itself, bestie πŸ’–.

✨ Synopsis ✨

Three constructor flavors, all (since C++11), all giving very specific main-character energy:

extreme_value_distribution() : extreme_value_distribution(0.0) {}

(1) (since C++11)

explicit extreme_value_distribution( RealType a, RealType b = 1.0 );

(2) (since C++11)

explicit extreme_value_distribution( const param_type& params );

(3) (since C++11)

Constructs a new distribution object. That's the whole assignment, no cap 🫢.

  • (1) is the no-arg one, and its initializer calls extreme_value_distribution(0.0).
  • (2) uses a and b as the distribution parameters.
  • (3) uses params as the distribution parameters.

πŸŽ€ Parameters πŸŽ€

  • a β€” the a distribution parameter (location) πŸ“
  • b β€” the b distribution parameter (scale) πŸ“
  • params β€” the distribution parameter set 🎁

πŸ’… Defect reports πŸ’…

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

  • DR: P0935R0
  • Applied to: C++11
  • Behavior as published: default constructor was explicit
  • Correct behavior: made implicit

So the default constructor got that glow-up from explicit to implicit, and we love that for it 😭✨.


Source/version shoutout: http://cppreference.com, dated 2024.06.10, on the std::extrem...distribution(3) page πŸ’…πŸ’–

πŸ“¦ where this page comes from