]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/units/detail/prevent_redefinition.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / units / detail / prevent_redefinition.hpp
1 // Boost.Units - A C++ library for zero-overhead dimensional analysis and
2 // unit/quantity manipulation and conversion
3 //
4 // Copyright (C) 2003-2008 Matthias Christian Schabel
5 // Copyright (C) 2007-2008 Steven Watanabe
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See
8 // accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10
11 #ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
12 #define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
13
14 #include <boost/mpl/long.hpp>
15
16 namespace boost {
17
18 namespace units {
19
20 namespace detail {
21
22 struct no { no() {} char dummy; };
23 struct yes { no dummy[2]; };
24
25 template<bool> struct ordinal_has_already_been_defined;
26
27 template<>
28 struct ordinal_has_already_been_defined<true> { };
29
30 template<>
31 struct ordinal_has_already_been_defined<false> { typedef void type; };
32
33 }
34
35 /// This must be in namespace boost::units so that ADL
36 /// will work. we need a mangled name because it must
37 /// be found by ADL
38 /// INTERNAL ONLY
39 template<class T>
40 detail::no
41 boost_units_is_registered(const T&)
42 { detail::no result; return(result); }
43
44 /// INTERNAL ONLY
45 template<class T>
46 detail::no
47 boost_units_unit_is_registered(const T&)
48 { detail::no result; return(result); }
49
50 } // namespace units
51
52 } // namespace boost
53
54 #endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP