mirror of
https://github.com/boostorg/safe_numerics.git
synced 2026-02-22 15:42:30 +00:00
improved TOC and chunking. This is complicated by the fact we that we desire different depths. put copies of boost logo in subdirectories
79 lines
2.4 KiB
XML
79 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
|
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
|
<section id="safe_numerics.integer">
|
|
<title>Integer<T></title>
|
|
|
|
<?dbhtml stop-chunking?>
|
|
|
|
<section>
|
|
<title>Description</title>
|
|
|
|
<para>A type is fulls the requirements of an Integer if it has the
|
|
properties of a integer.</para>
|
|
|
|
<para>More specifically, a type T is Integer if there exists
|
|
specialization of <code>std::numeric_limits<T> for which
|
|
std::numeric_limits<T>:: is_integer</code> is equal to
|
|
<code>true</code>. See the documentation for standard library class
|
|
numeric_limits. The standard library includes such specializations for all
|
|
the primitive numeric types. Note that this concept is distinct from the
|
|
C++ standard library type traits <code>is_integral</code> and
|
|
<code>is_arithmetic</code>. These latter fulfill the requirement of the
|
|
concept Numeric. But there are types which fulfill this concept for which
|
|
<code>is_arithmetic<T>::value == false</code>. For example see
|
|
<code>safe<int></code>.</para>
|
|
</section>
|
|
|
|
<section>
|
|
<title>Refinement of</title>
|
|
|
|
<para><link linkend="safe_numerics.numeric">Numeric</link></para>
|
|
</section>
|
|
|
|
<section>
|
|
<title>Valid Expressions</title>
|
|
|
|
<para>In addition to the expressions defined in <link
|
|
linkend="safe_numerics.numeric">Numeric</link> the following expressions
|
|
must be valid. <informaltable>
|
|
<tgroup cols="2">
|
|
<colspec align="left"/>
|
|
|
|
<colspec align="left"/>
|
|
|
|
<thead>
|
|
<row>
|
|
<entry align="left">Expression</entry>
|
|
|
|
<entry>Return Value</entry>
|
|
</row>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<row>
|
|
<entry><code>std::numeric_limits<T>
|
|
is_integer</code></entry>
|
|
|
|
<entry>true</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable></para>
|
|
</section>
|
|
|
|
<section>
|
|
<title>Header</title>
|
|
|
|
<para><ulink url="../../include/concept/numeric.hpp"><code>#include
|
|
<safe_numerics/include/concepts/numeric.hpp> </code></ulink></para>
|
|
</section>
|
|
|
|
<section>
|
|
<title>Models</title>
|
|
|
|
<para><code>int, safe<int>, safe_unsigned_range<0, 11>,
|
|
etc.</code></para>
|
|
</section>
|
|
</section>
|