This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/78491] invalid conversion from 'const void*' to 'void*'


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]