rdjava9's blog

By rdjava9, history, 20 months ago, In English

Codeforces, GNU G++20 compiler's standard library implementation provided has a bug due to which its hard to write std::ranges code with it. So, urgently needs to be updated.

The provided standard library implementation has an extra constraint in concept std::weakly_incrementable of being std::default_initializable (Bug report).

This means, if I want to define any custom iterator that supports range operations, the iterator should be default initializable. That is really not required and this extra constraint is not there in C++ standard Standard definition for std::weakly_incrementable.

I was trying to make a group_by iterator and a group_by range. Because that's really handy range for contests. However, the correct implementation doesn't compile on the platform. Instead I had to provide a dummy default constructor that was anyways going to be buggy.

So, I request Codeforces platform to upgrade (all) the compilers provided for C++20, so that we can actually use C++20 features on its full potential in contest.

Thank You

  • Vote: I like it
  • +16
  • Vote: I do not like it

| Write comment?
»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Which version of G++ got this problem fixed?