Dont use include guard for ipp, use include errors

This commit is contained in:
Danny Robson 2012-08-22 16:13:23 +10:00
parent f90ff0e9f6
commit c281f4c507
3 changed files with 22 additions and 5 deletions

11
log.ipp
View File

@ -17,11 +17,18 @@
* Copyright 2012 Danny Robson <danny@nerdcruft.net> * Copyright 2012 Danny Robson <danny@nerdcruft.net>
*/ */
#ifndef __UTIL_LOG_IPP #ifdef __UTIL_LOG_IPP
#error Double inclusion of util/log.ipp
#endif
#define __UTIL_LOG_IPP #define __UTIL_LOG_IPP
//-----------------------------------------------------------------------------
#include <boost/format.hpp> #include <boost/format.hpp>
//-----------------------------------------------------------------------------
namespace util { namespace util {
namespace detail { namespace detail {
void void
@ -39,5 +46,3 @@ namespace util {
{ detail::log (l, std::move (boost::format (format)), _tail...); } { detail::log (l, std::move (boost::format (format)), _tail...); }
} }
#endif

View File

@ -17,6 +17,14 @@
* Copyright 2010 Danny Robson <danny@nerdcruft.net> * Copyright 2010 Danny Robson <danny@nerdcruft.net>
*/ */
#ifdef __UTIL_MATHS_POLYNOMIAL_IPP
#error Double includion of util/maths/polynomial.hpp
#endif
#define __UTIL_MATHS_POLYNOMIAL_IPP
//-----------------------------------------------------------------------------
template <typename T, size_t N> template <typename T, size_t N>
T T
maths::polynomial<T,N>::eval (T x) const { maths::polynomial<T,N>::eval (T x) const {

View File

@ -17,9 +17,14 @@
* Copyright 2010 Danny Robson <danny@nerdcruft.net> * Copyright 2010 Danny Robson <danny@nerdcruft.net>
*/ */
#ifndef __UTIL_RANDOM_IPP #ifdef __UTIL_RANDOM_IPP
#error Double inclusion of util/random.ipp
#endif
#define __UTIL_RANDOM_IPP #define __UTIL_RANDOM_IPP
//-----------------------------------------------------------------------------
namespace util { namespace util {
template <typename T, size_t N> template <typename T, size_t N>
T* randomise (T (&array)[N]) { T* randomise (T (&array)[N]) {
@ -29,4 +34,3 @@ namespace util {
} }
} }
#endif