Hi,
> There is a switch in g++ that warns about c style casts.
> I will try to fix those but there are plenty in the project where I
> am working.
>
> Can someone recommend a function that would allow to do this in vim?
In lh-cpp (*), I have 3 mappings that transform C casts into C++ casts -- and 6 more to cast an expression.
This has to be done manually: you'll have to know if you want a const_cast, a static_cast, or a reinterpret_cast. As Dominique said, it can't really be done automatically. May be, clang could automate many things, but it won't be able to know whether you want to downcast with a dynamic_cast or with a static_cast?
(*) https://github.com/LucHermitte/lh-cpp
HTH,
--
Luc Hermitte
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Friday, February 26, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment