exercism / cpp

Exercism exercises in C++.
https://exercism.org/tracks/cpp
MIT License
259 stars 217 forks source link

docs(litertals): add comment on compiler differences #902

Closed vaeng closed 1 month ago

vaeng commented 2 months ago
          Yeah, I should have probably opened a separate PR for this. The `d` suffix is not part of the [C++ standard](https://en.cppreference.com/w/cpp/language/floating_literal) it seems:

suffix, if present, is one of f, l, F, L, f16, f32, f64, f128, bf16, F16, F32, F64, F128, BF16(since C++23).

ChatGPT claims it was a common thing, but I have never seen it before and apparently it is only supported by GCC. Clang and MSVC report an error.

_Originally posted by @ahans in https://github.com/exercism/cpp/pull/856#discussion_r1563183971_