vmd_vc.qbk 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. [/
  2. (C) Copyright Edward Diener 2011-2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:vmd_vc Visual C++ define]
  8. Microsoft's Visual C++ compiler, abbreviated VC++, is a very popular compiler
  9. but does not implement the standard C++ preprocessor correctly in a number of respects.
  10. Because of this the programmer using the VMD needs to occasionally do things
  11. differently when VC++ is being used. These "quirks" of VC++ have been smoothed over
  12. as much as possible in the VMD library, but are mentioned in further topics and
  13. occasionally must be addressed by the programmer using VMD.
  14. The VMD has a macro that indicates when VC++ is the compiler being used. The
  15. macro is an object-like macro called BOOST_VMD_MSVC. It is set to 1 when VC++
  16. is being used and set to 0 when VC++ is not being used. You can use this macro
  17. in your own macro code whenever you include a VMD header file to write code
  18. which may need special processing for VC++ as outlined in this documentation.
  19. Your macro processing may therefore occasional take the form of:
  20. #include <boost/vmd/some_header.hpp>
  21. #if BOOST_VMD_MSVC
  22. #define SOME_MACRO ... code for VC++
  23. #else
  24. #define SOME_MACRO ... code for all other compilers
  25. #endif
  26. [endsect]