[Bug c++/103668] constexpr std::vector not working as expected

2021-12-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/103668] constexpr std::vector not working as expected

2021-12-12 Thread andrei.popa105 at yahoo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668 --- Comment #4 from Andrei-Edward Popa --- Yes, I really missed this constexpr instead of const, this is clear for me. Thank you! I think this thread can be closed now.

[Bug c++/103668] constexpr std::vector not working as expected

2021-12-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug c++/103668] constexpr std::vector not working as expected

2021-12-12 Thread andrei.popa105 at yahoo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668 --- Comment #2 from Andrei-Edward Popa --- This code is valid in MSVC compiler, that's why I'm wondering about it.

[Bug c++/103668] constexpr std::vector not working as expected

2021-12-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103668 --- Comment #1 from Jonathan Wakely --- I don't think this is valid C++. A vector created in a constexpr function must be destroyed there as well, it cannot escape from the function.