문제

After reading about the pimpl idiom I was horrified!

Isn't there a tool out there that can inspect a .h/.cpp file and deduce what dependencies could be waivered?

도움이 되었습니까?

해결책

Sorry, but no there isn't. C++ still relies on preprocessing source files, very mechanical. Large-scale C++ development is all about reducing the dependencies. In my opinion, C++ is simply not suitable for those kinds of tasks.

다른 팁

Does precompiling the headers not solve many of these horrors. Both MS and g++ support these now.

Static code inspection for C++ is a nightmare, because of its syntax and macro preprocessor, I doubt there are tools like the one you describe.

If it existed, what would you expect from it? Would you like it to refactor/rewrite code for you? Adding and/or removing what?

Sounds like a daunting task to me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top