This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/78491] invalid conversion from 'const void*' to 'void*'
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Nov 2016 12:07:17 +0000
- Subject: [Bug libstdc++/78491] invalid conversion from 'const void*' to 'void*'
- Auto-submitted: auto-generated
- References: <bug-78491-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78491
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Luca Stoppa from comment #2)
> Just wanted to add that changing the vector element from "const std::string"
> to "std::string" seems to fix this issue.
Using vector<const T> is not valid C++, so this is not a bug in GCC, it's a bug
in your code. The default allocator, std::allocator<T>, does not support const
types.