我想知道在给定特定调用的情况下如何在编译时扩展我的模板,尤其是我有兴趣了解有关SFINAE的所有可能用法和行为的信息。
您知道gcc
和/或clang
中的一个或多个标志可以帮助我吗?
最佳答案
“SFINAE的所有可能行为”太含糊且太笼统。但是-如果您想了解编译器如何实例化代码中的模板,则可能对您有用:
**Templight* is a Clang-based tool to profile the time and memory consumption of template instantiations and to perform interactive debugging sessions to gain introspection into the template instantiation process.
Templight似乎是编译过程的前端部分,因此稍后,您可以使用名为templater的可视化工具。
警告:我没有尝试过自己做。
关于c++ - 在gcc或clang中调试SFINAE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24814238/