简体   繁体   中英

Best setup for c++ template/generic/metaprogramming

I am writing/maintaining some heavily templated code in c++. I am currently compiling it on windows but it is getting slower to compile and harder to write.

I want to know if there are any

  1. Tools
  2. Other Compilers
  3. Compiler Switch
  4. IDE
  5. Practice
  6. Dependency Management Technique
  7. Libraries

on Windows/Linux that can help to work on heavily templated code more easily.

i use:

If possible, upgrade your compiler. I don't have much experience with Windows, but the upgrade from gcc 4.x to gcc 4.5 is noticeably faster for projects that make heavy use of templates.

Which compiler are you using now? Various compilers have different quality template support and error messages. Clang and Intel tend to be pretty good; GCC usually prints out the necessary information but it is often hard to read. Visual Studio has nice formatting and is fairly compliant. In terms of speed, GCC 4.6 is claimed to be much faster than earlier versions. You might want to download STLfilt to make the errors easier to read. Boost (especially Boost.MPL) is a good library for doing template metaprograms; you might also want Boost.Fusion and/or Boost.Proto depending on what you are doing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM