]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/units/include/boost/units/detail/prevent_redefinition.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / units / include / boost / units / detail / prevent_redefinition.hpp
CommitLineData
7c673cae
FG
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
16namespace boost {
17
18namespace units {
19
20namespace detail {
21
22struct no { no() {} char dummy; };
23struct yes { no dummy[2]; };
24
25template<bool> struct ordinal_has_already_been_defined;
26
27template<>
28struct ordinal_has_already_been_defined<true> { };
29
30template<>
31struct 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
39template<class T>
40detail::no
41boost_units_is_registered(const T&)
42{ detail::no result; return(result); }
43
44/// INTERNAL ONLY
45template<class T>
46detail::no
47boost_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