Chris@16: // Boost.Units - A C++ library for zero-overhead dimensional analysis and Chris@16: // unit/quantity manipulation and conversion Chris@16: // Chris@16: // Copyright (C) 2003-2008 Matthias Christian Schabel Chris@16: // Copyright (C) 2007-2008 Steven Watanabe Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP Chris@16: #define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: namespace units { Chris@16: Chris@16: namespace detail { Chris@16: Chris@16: struct no { no() {} char dummy; }; Chris@16: struct yes { no dummy[2]; }; Chris@16: Chris@16: template struct ordinal_has_already_been_defined; Chris@16: Chris@16: template<> Chris@16: struct ordinal_has_already_been_defined { }; Chris@16: Chris@16: template<> Chris@16: struct ordinal_has_already_been_defined { typedef void type; }; Chris@16: Chris@16: } Chris@16: Chris@16: /// This must be in namespace boost::units so that ADL Chris@16: /// will work. we need a mangled name because it must Chris@16: /// be found by ADL Chris@16: /// INTERNAL ONLY Chris@16: template Chris@16: detail::no Chris@16: boost_units_is_registered(const T&) Chris@16: { detail::no result; return(result); } Chris@16: Chris@16: /// INTERNAL ONLY Chris@16: template Chris@16: detail::no Chris@16: boost_units_unit_is_registered(const T&) Chris@16: { detail::no result; return(result); } Chris@16: Chris@16: } // namespace units Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP