Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:14

0001 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
0002 // unit/quantity manipulation and conversion
0003 //
0004 // Copyright (C) 2003-2008 Matthias Christian Schabel
0005 // Copyright (C) 2007-2008 Steven Watanabe
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See
0008 // accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
0012 #define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
0013 
0014 #include <boost/mpl/long.hpp>
0015 
0016 namespace boost {
0017 
0018 namespace units {
0019 
0020 namespace detail {
0021 
0022 struct no { BOOST_CONSTEXPR no() : dummy() {} char dummy; };
0023 struct yes { no dummy[2]; };
0024 
0025 template<bool> struct ordinal_has_already_been_defined;
0026 
0027 template<>
0028 struct ordinal_has_already_been_defined<true>   { };
0029 
0030 template<>
0031 struct ordinal_has_already_been_defined<false>  { typedef void type; };
0032 
0033 }
0034 
0035 /// This must be in namespace boost::units so that ADL
0036 /// will work.  we need a mangled name because it must
0037 /// be found by ADL
0038 /// INTERNAL ONLY
0039 template<class T>
0040 BOOST_CONSTEXPR
0041 detail::no 
0042 boost_units_is_registered(const T&) 
0043 { return(detail::no()); }
0044 
0045 /// INTERNAL ONLY
0046 template<class T>
0047 BOOST_CONSTEXPR
0048 detail::no 
0049 boost_units_unit_is_registered(const T&) 
0050 { return(detail::no()); }
0051 
0052 } // namespace units
0053 
0054 } // namespace boost
0055 
0056 #endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP