L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
arith
1// vi:set ft=cpp: -*- Mode: C++ -*-
2/*
3 * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
5 *
6 * License: see LICENSE.spdx (in this directory or the directories above)
7 */
8
9#pragma once
10
11namespace cxx { namespace arith {
12
13template< unsigned long V >
14struct Ld
15{
16 enum { value = Ld<V / 2>::value + 1 };
17};
18
19template<>
20struct Ld<0>
21{
22 enum { value = ~0UL };
23};
24
25template<>
26struct Ld<1>
27{
28 enum { value = 0 };
29};
30
31}}
Our C++ library.
Definition arith:11