• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Class template int_adapter</title>
6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="../../date_time/doxy.html#header.boost.date_time.int_adapter_hpp" title="Header &lt;boost/date_time/int_adapter.hpp&gt;">
10<link rel="prev" href="gregorian_calendar_base.html" title="Class template gregorian_calendar_base">
11<link rel="next" href="opera_1_3_14_15_3_29_1_1_2.html" title="Function template operator&lt;&lt;">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16<td align="center"><a href="../../../../index.html">Home</a></td>
17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="gregorian_calendar_base.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#header.boost.date_time.int_adapter_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opera_1_3_14_15_3_29_1_1_2.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="boost.date_time.int_adapter"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Class template int_adapter</span></h2>
30<p>boost::date_time::int_adapter — Adapter to create integer types with +-infinity, and not a value. </p>
31</div>
32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../date_time/doxy.html#header.boost.date_time.int_adapter_hpp" title="Header &lt;boost/date_time/int_adapter.hpp&gt;">boost/date_time/int_adapter.hpp</a>&gt;
34
35</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> int_type_<span class="special">&gt;</span>
36<span class="keyword">class</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">{</span>
37<span class="keyword">public</span><span class="special">:</span>
38  <span class="comment">// types</span>
39  <span class="keyword">typedef</span> <span class="identifier">int_type_</span> <a name="boost.date_time.int_adapter.int_type"></a><span class="identifier">int_type</span><span class="special">;</span>
40
41  <span class="comment">// <a class="link" href="int_adapter.html#boost.date_time.int_adapterconstruct-copy-destruct">construct/copy/destruct</a></span>
42  <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_6-bb"><span class="identifier">int_adapter</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
43
44  <span class="comment">// <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5-bb">public member functions</a></span>
45  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_1-bb"><span class="identifier">is_infinity</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
46  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_2-bb"><span class="identifier">is_pos_infinity</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
47  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_3-bb"><span class="identifier">is_neg_infinity</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
48  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_4-bb"><span class="identifier">is_nan</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
49  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_5-bb"><span class="identifier">is_special</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
50  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_6-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
51  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_7-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
52  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_8-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
53  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_9-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
54  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_10-bb"><span class="keyword">operator</span><span class="special">&lt;</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
55  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_11-bb"><span class="keyword">operator</span><span class="special">&lt;</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
56  <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_12-bb"><span class="keyword">operator</span><span class="special">&gt;</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
57  <span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">int_type</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_13-bb"><span class="identifier">as_number</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
58  <span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">special_values</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_14-bb"><span class="identifier">as_special</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
59  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> rhs_type<span class="special">&gt;</span>
60    <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
61    <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_15-bb"><span class="keyword">operator</span><span class="special">+</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a><span class="special">&lt;</span> <span class="identifier">rhs_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
62  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_16-bb"><span class="keyword">operator</span><span class="special">+</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">int_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
63  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> rhs_type<span class="special">&gt;</span>
64    <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
65    <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_17-bb"><span class="keyword">operator</span><span class="special">-</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a><span class="special">&lt;</span> <span class="identifier">rhs_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
66  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_18-bb"><span class="keyword">operator</span><span class="special">-</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">int_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
67  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_19-bb"><span class="keyword">operator</span> <span class="special">*</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
68  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_20-bb"><span class="keyword">operator</span> <span class="special">*</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
69  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_21-bb"><span class="keyword">operator</span><span class="special">/</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
70  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_22-bb"><span class="keyword">operator</span><span class="special">/</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
71  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_23-bb"><span class="keyword">operator</span><span class="special">%</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
72  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_5_24-bb"><span class="keyword">operator</span><span class="special">%</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
73
74  <span class="comment">// <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7-bb">public static functions</a></span>
75  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_1-bb"><span class="identifier">has_infinity</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
76  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_2-bb"><span class="identifier">pos_infinity</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
77  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_3-bb"><span class="identifier">neg_infinity</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
78  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_4-bb"><span class="identifier">not_a_number</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
79  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="identifier">max</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_5-bb"><span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
80  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="identifier">min</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_6-bb"><span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
81  <span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_7-bb"><span class="identifier">from_special</span></a><span class="special">(</span><span class="identifier">special_values</span><span class="special">)</span><span class="special">;</span>
82  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_8-bb"><span class="identifier">is_inf</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
83  <span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_9-bb"><span class="identifier">is_neg_inf</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
84  <span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_10-bb"><span class="identifier">is_pos_inf</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
85  <span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_11-bb"><span class="identifier">is_not_a_number</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
86  <span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">special_values</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_12-bb"><span class="identifier">to_special</span></a><span class="special">(</span><span class="identifier">int_type</span><span class="special">)</span><span class="special">;</span>
87  <span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">int_type</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_7_13-bb"><span class="identifier">maxcount</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
88
89  <span class="comment">// <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_8-bb">private member functions</a></span>
90  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">int</span> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_8_1-bb"><span class="identifier">compare</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
91  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
92  <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_8_2-bb"><span class="identifier">mult_div_specials</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
93  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a class="link" href="int_adapter.html#id-1_3_14_15_3_29_1_1_1_8_3-bb"><span class="identifier">mult_div_specials</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
94<span class="special">}</span><span class="special">;</span></pre></div>
95<div class="refsect1">
96<a name="id-1.3.14.15.3.29.3.4"></a><h2>Description</h2>
97<p>This class is used internally in counted date/time representations. It adds the floating point like features of infinities and not a number. It also provides mathmatical operations with consideration to special values following these rules: </p>
98<pre class="programlisting"><span class="special">+</span><span class="identifier">infinity</span>  <span class="special">-</span>  <span class="identifier">infinity</span>  <span class="special">==</span> <span class="identifier">Not</span> <span class="identifier">A</span> <span class="identifier">Number</span> <span class="special">(</span><span class="identifier">NAN</span><span class="special">)</span>
99 <span class="identifier">infinity</span>  <span class="special">*</span>  <span class="identifier">non</span><span class="special">-</span><span class="identifier">zero</span>  <span class="special">==</span> <span class="identifier">infinity</span>
100 <span class="identifier">infinity</span>  <span class="special">*</span>  <span class="identifier">zero</span>      <span class="special">==</span> <span class="identifier">NAN</span>
101<span class="special">+</span><span class="identifier">infinity</span>  <span class="special">*</span> <span class="special">-</span><span class="identifier">integer</span>   <span class="special">==</span> <span class="special">-</span><span class="identifier">infinity</span>
102 <span class="identifier">infinity</span>  <span class="special">/</span>  <span class="identifier">infinity</span>  <span class="special">==</span> <span class="identifier">NAN</span>
103 <span class="identifier">infinity</span>  <span class="special">*</span>  <span class="identifier">infinity</span>  <span class="special">==</span> <span class="identifier">infinity</span>
104</pre>
105<p> </p>
106<div class="refsect2">
107<a name="id-1.3.14.15.3.29.3.4.3"></a><h3>
108<a name="boost.date_time.int_adapterconstruct-copy-destruct"></a><code class="computeroutput">int_adapter</code>
109        public
110       construct/copy/destruct</h3>
111<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><a name="id-1_3_14_15_3_29_1_1_1_6-bb"></a><span class="identifier">int_adapter</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre></li></ol></div>
112</div>
113<div class="refsect2">
114<a name="id-1.3.14.15.3.29.3.4.4"></a><h3>
115<a name="id-1_3_14_15_3_29_1_1_1_5-bb"></a><code class="computeroutput">int_adapter</code> public member functions</h3>
116<div class="orderedlist"><ol class="orderedlist" type="1">
117<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_1-bb"></a><span class="identifier">is_infinity</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
118<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_2-bb"></a><span class="identifier">is_pos_infinity</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
119<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_3-bb"></a><span class="identifier">is_neg_infinity</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
120<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_4-bb"></a><span class="identifier">is_nan</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
121<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_5-bb"></a><span class="identifier">is_special</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
122<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_6-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
123<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_7-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
124<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_8-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
125<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_9-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
126<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_10-bb"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
127<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_11-bb"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
128<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_5_12-bb"></a><span class="keyword">operator</span><span class="special">&gt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
129<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">int_type</span> <a name="id-1_3_14_15_3_29_1_1_1_5_13-bb"></a><span class="identifier">as_number</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
130<li class="listitem">
131<pre class="literallayout"><span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">special_values</span> <a name="id-1_3_14_15_3_29_1_1_1_5_14-bb"></a><span class="identifier">as_special</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Returns either special value type or is_not_special. </li>
132<li class="listitem">
133<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> rhs_type<span class="special">&gt;</span>
134  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
135  <a name="id-1_3_14_15_3_29_1_1_1_5_15-bb"></a><span class="keyword">operator</span><span class="special">+</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a><span class="special">&lt;</span> <span class="identifier">rhs_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
136<p>Operator allows for adding dissimilar <code class="computeroutput"><a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a></code> types. The return type will match that of the the calling object's type </p>
137</li>
138<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_16-bb"></a><span class="keyword">operator</span><span class="special">+</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">int_type</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
139<li class="listitem">
140<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> rhs_type<span class="special">&gt;</span>
141  <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
142  <a name="id-1_3_14_15_3_29_1_1_1_5_17-bb"></a><span class="keyword">operator</span><span class="special">-</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a><span class="special">&lt;</span> <span class="identifier">rhs_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
143<p>Operator allows for subtracting dissimilar <code class="computeroutput"><a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a></code> types. The return type will match that of the the calling object's type </p>
144</li>
145<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_18-bb"></a><span class="keyword">operator</span><span class="special">-</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">int_type</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
146<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_19-bb"></a><span class="keyword">operator</span> <span class="special">*</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
147<li class="listitem">
148<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_20-bb"></a><span class="keyword">operator</span> <span class="special">*</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
149<p>Provided for cases when automatic conversion from 'int' to '<code class="computeroutput"><a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a></code>' causes incorrect results. </p>
150</li>
151<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_21-bb"></a><span class="keyword">operator</span><span class="special">/</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
152<li class="listitem">
153<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_22-bb"></a><span class="keyword">operator</span><span class="special">/</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
154<p>Provided for cases when automatic conversion from 'int' to '<code class="computeroutput"><a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a></code>' causes incorrect results. </p>
155</li>
156<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_23-bb"></a><span class="keyword">operator</span><span class="special">%</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
157<li class="listitem">
158<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_5_24-bb"></a><span class="keyword">operator</span><span class="special">%</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
159<p>Provided for cases when automatic conversion from 'int' to '<code class="computeroutput"><a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a></code>' causes incorrect results. </p>
160</li>
161</ol></div>
162</div>
163<div class="refsect2">
164<a name="id-1.3.14.15.3.29.3.4.5"></a><h3>
165<a name="id-1_3_14_15_3_29_1_1_1_7-bb"></a><code class="computeroutput">int_adapter</code> public static functions</h3>
166<div class="orderedlist"><ol class="orderedlist" type="1">
167<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_7_1-bb"></a><span class="identifier">has_infinity</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
168<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_7_2-bb"></a><span class="identifier">pos_infinity</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
169<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_7_3-bb"></a><span class="identifier">neg_infinity</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
170<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_7_4-bb"></a><span class="identifier">not_a_number</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
171<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="identifier">max</span> <a name="id-1_3_14_15_3_29_1_1_1_7_5-bb"></a><span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
172<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="identifier">min</span> <a name="id-1_3_14_15_3_29_1_1_1_7_6-bb"></a><span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
173<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_7_7-bb"></a><span class="identifier">from_special</span><span class="special">(</span><span class="identifier">special_values</span> sv<span class="special">)</span><span class="special">;</span></pre></li>
174<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_7_8-bb"></a><span class="identifier">is_inf</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre></li>
175<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_7_9-bb"></a><span class="identifier">is_neg_inf</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre></li>
176<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_7_10-bb"></a><span class="identifier">is_pos_inf</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre></li>
177<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">bool</span> <a name="id-1_3_14_15_3_29_1_1_1_7_11-bb"></a><span class="identifier">is_not_a_number</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre></li>
178<li class="listitem">
179<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">special_values</span> <a name="id-1_3_14_15_3_29_1_1_1_7_12-bb"></a><span class="identifier">to_special</span><span class="special">(</span><span class="identifier">int_type</span> v<span class="special">)</span><span class="special">;</span></pre>Returns either special value type or is_not_special. </li>
180<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">int_type</span> <a name="id-1_3_14_15_3_29_1_1_1_7_13-bb"></a><span class="identifier">maxcount</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
181</ol></div>
182</div>
183<div class="refsect2">
184<a name="id-1.3.14.15.3.29.3.4.6"></a><h3>
185<a name="id-1_3_14_15_3_29_1_1_1_8-bb"></a><code class="computeroutput">int_adapter</code> private member functions</h3>
186<div class="orderedlist"><ol class="orderedlist" type="1">
187<li class="listitem">
188<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="keyword">int</span> <a name="id-1_3_14_15_3_29_1_1_1_8_1-bb"></a><span class="identifier">compare</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>returns -1, 0, 1, or 2 if 'this' is &lt;, ==, &gt;, or 'nan comparison' rhs </li>
189<li class="listitem">
190<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a>
191<a name="id-1_3_14_15_3_29_1_1_1_8_2-bb"></a><span class="identifier">mult_div_specials</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Assumes at least 'this' or 'rhs' is a special value. </li>
192<li class="listitem">
193<pre class="literallayout"><span class="identifier">BOOST_CXX14_CONSTEXPR</span> <a class="link" href="int_adapter.html" title="Class template int_adapter">int_adapter</a> <a name="id-1_3_14_15_3_29_1_1_1_8_3-bb"></a><span class="identifier">mult_div_specials</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Assumes 'this' is a special value. </li>
194</ol></div>
195</div>
196</div>
197</div>
198<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
199<td align="left"></td>
200<td align="right"><div class="copyright-footer">Copyright © 2001-2005 CrystalClear Software, Inc<p>Subject to the Boost Software License, Version 1.0. (See accompanying file
201    <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
202</div></td>
203</tr></table>
204<hr>
205<div class="spirit-nav">
206<a accesskey="p" href="gregorian_calendar_base.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#header.boost.date_time.int_adapter_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="opera_1_3_14_15_3_29_1_1_2.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
207</div>
208</body>
209</html>
210