Блог пользователя ForgottenCat

Автор ForgottenCat, история, 5 месяцев назад, По-английски

I use vector::assign_range, and CE. Also happens on append_range (using C++23). Is the compiler outdated? If so, plz update.

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by ForgottenCat (previous revision, new revision, compare).

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

So C++ has something called feature testing. Basically, when GCC say implements C++23, there is no clear guarantee that they implement the whole of the standard. So, when something is implemented (at least as of C++20 I believe), there will be a corresponding flag enabled.

In this case, assign_range has the __cpp_lib_containers_ranges feature test macro, and as per the example they provide there, you can check whether or not that macro is actually present or not (I tested and it's not present on codeforces as you might expect).

So as you said, most likely G++ 14.2 with C++23 [msys2, 64bit] just hasn't implemented that feature yet...