• Forum
  • Lounge
  • Article Series: "How It Works" (Discussi

 
Article Series: "How It Works" (Discussion)

closed account (3hM2Nwbp)
I've been reading over a lot of the boost library sources lately (more so than actually typing out code!) and there are so many little tricks that I've seen that make me just smirk and think "How clever..."

What I'd like to do is take the sources and give an in depth look at how they work and why they are coded the way they are. The only thing that bothers me about this is when you get into code like this:
1
2
3
4
5
6
7
8
9
# if (defined(__GNUC__) && __GNUC__ >= 3) \
 || defined(_AIX) \
 || (   defined(__sgi) && defined(__host_mips)) \
 || (defined(__hpux) && defined(__HP_aCC)) \
 || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
#  define BOOST_AUX_ANY_TYPE_ID_NAME
#include <cstring>
# endif
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.  


Since boost supports so many platforms and compiler setups, many of it's libraries are riddled with preprocessor directives (so much in certain areas that it makes the code exceptionally hard to read).

What would you think the best way to pick the sources apart and explain them pretty much line by line? Any particular formats that come to mind?
Topic archived. No new replies allowed.