annotate DEPENDENCIES/generic/include/boost/units/detail/prevent_redefinition.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
Chris@16 2 // unit/quantity manipulation and conversion
Chris@16 3 //
Chris@16 4 // Copyright (C) 2003-2008 Matthias Christian Schabel
Chris@16 5 // Copyright (C) 2007-2008 Steven Watanabe
Chris@16 6 //
Chris@16 7 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 8 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 9 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 10
Chris@16 11 #ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
Chris@16 12 #define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
Chris@16 13
Chris@16 14 #include <boost/mpl/long.hpp>
Chris@16 15
Chris@16 16 namespace boost {
Chris@16 17
Chris@16 18 namespace units {
Chris@16 19
Chris@16 20 namespace detail {
Chris@16 21
Chris@16 22 struct no { no() {} char dummy; };
Chris@16 23 struct yes { no dummy[2]; };
Chris@16 24
Chris@16 25 template<bool> struct ordinal_has_already_been_defined;
Chris@16 26
Chris@16 27 template<>
Chris@16 28 struct ordinal_has_already_been_defined<true> { };
Chris@16 29
Chris@16 30 template<>
Chris@16 31 struct ordinal_has_already_been_defined<false> { typedef void type; };
Chris@16 32
Chris@16 33 }
Chris@16 34
Chris@16 35 /// This must be in namespace boost::units so that ADL
Chris@16 36 /// will work. we need a mangled name because it must
Chris@16 37 /// be found by ADL
Chris@16 38 /// INTERNAL ONLY
Chris@16 39 template<class T>
Chris@16 40 detail::no
Chris@16 41 boost_units_is_registered(const T&)
Chris@16 42 { detail::no result; return(result); }
Chris@16 43
Chris@16 44 /// INTERNAL ONLY
Chris@16 45 template<class T>
Chris@16 46 detail::no
Chris@16 47 boost_units_unit_is_registered(const T&)
Chris@16 48 { detail::no result; return(result); }
Chris@16 49
Chris@16 50 } // namespace units
Chris@16 51
Chris@16 52 } // namespace boost
Chris@16 53
Chris@16 54 #endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP