Skip to content

[libc++] <random>: piecewise_linear_distribution(InputIteratorB, InputIteratorB, InputIteratorW) invokes comma operator #160732

@hewillk

Description

@hewillk
#include <random>

struct I {
  using iterator_category = std::input_iterator_tag;
  using value_type = double;
  using difference_type = std::ptrdiff_t;
  using pointer = double*;
  using reference = double&;
  reference operator*() const;
  pointer operator->() const;
  I& operator++();
  I operator++(int);
  bool operator==(const I&) const;
};

void operator,(auto, I) = delete;

int main() {
  std::piecewise_linear_distribution<double> dist(I{}, I{}, I{});
}

https://godbolt.org/z/655T36eh5

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.random

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions