Is it bug, that std::rotate
function have void
return value type in GCC 4.9 even if I specify -std=gnu++1y
flag? As it pointed here there should be meaningfull (for some applications) return value.
Asked
Active
Viewed 455 times
6

manlio
- 18,345
- 14
- 76
- 126

Tomilov Anatoliy
- 15,657
- 10
- 64
- 169
-
How do you call `std::rotate`? There're two versions one returns `void` and the other an `iterator`. – 101010 Jun 02 '14 at 11:23
-
Please explain what do you imply when you ask me about "how I call"? Do you know, that expected result type is not involved in overloading resolution? – Tomilov Anatoliy Jun 02 '14 at 11:26
-
There is only the version. Where you seen two ones? – Tomilov Anatoliy Jun 02 '14 at 11:27
-
Pre C++11 and post C++11. – 101010 Jun 02 '14 at 11:28
-
@40two OK, but in particular translation unit after the preprocessing step only one is reachable anyways. Which one is depend on compiler flags. – Tomilov Anatoliy Jun 02 '14 at 11:29
-
2+1 You're right, I think it's not implemented yet. Thus, it is a bug. – 101010 Jun 02 '14 at 11:35
1 Answers
5
- It looks like
std::rotate
in gcc doesn't conform to the C++11 standard (i.e., it's not implemented yet). - I searched GCC Bugzilla and it seems that the bug is already reported since version 4.8.1 and currently being unassigned with status new.
- Thus, is a bug. Well spotted you should report it.

101010
- 41,839
- 11
- 94
- 168
-
-
Can you explain, why this "bug" (so little at my mind: just changing two lines of code) is not fixed at the moment? Very interesting situation in light of usefulness of the **libstdc++**. – Tomilov Anatoliy Jun 03 '14 at 02:45
-
@Orient I agree with you, but for this you'll have to ask the GCC developers. – 101010 Jun 03 '14 at 06:10