Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-21 17:29:51


I'm looking for a legal way to cause certain constructs to fail to
compile based on what templates have been instantiated at that point in
the program. The catch is that I also want it to be legal to compile the
same constructs in other translation units (and, if I have to settle for
something permissive, earlier in the same translation unit) where the
preventing templates have not been instantiated. Most approaches to this
problem result in ODR violations, AFAIK. I'm thinking that there may be
some promise in the use of the Barton & Nackmann trick in combination
with the unnamed namespace, but I'm not very clear about it. Has anyone
already solved this puzzle?


                  David Abrahams
      C++ Booster ( O__ ==
      Pythonista ( c/ /'_ ==
  resume: (*) \(*) ==
          email: david.abrahams_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at