[mlpack-svn] [MLPACK] #155: order of includes and include protections
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Mon Oct 31 15:06:06 EDT 2011
#155: order of includes and include protections
--------------------------------------------------+-------------------------
Reporter: nslagle | Owner:
Type: wishlist | Status: new
Priority: major | Milestone:
Component: MLPACK | Resolution:
Keywords: includes, templates, style, nitpick | Blocking:
Blocked By: |
--------------------------------------------------+-------------------------
Comment (by rcurtin):
I don't think the extra complexity of the `USE_DO_STUFF_EVER_IMPL` is
necessary; I think we should assume that if `DO_STUFF_EVER_HPP` is
defined, then do_stuff_ever.hpp was included (at some point) and it's safe
to include the implementation.
If the user is brash enough to define `DO_STUFF_EVER_HPP` on their own,
well, then, I say, we let them be as dangerous as they like. One doesn't
arbitrarily write `#define DO_STUFF_EVER_HPP` without knowing what they're
doing -- and if they really are that clueless, they're beyond our help.
Also, I'll be picky and say that the actual format of the include guards
should be `__MLPACK_PATH_TO_FILE_HPP`; such as,
`__MLPACK_METHODS_NCA_NCA_HPP` or similar. At least, that's mostly how
we're doing it already.
I've started to implement your original solution for protecting
`_impl.hpp` files.
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/155#comment:3>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.
More information about the mlpack-svn
mailing list