Skip to content

Commit e23a669

Browse files
committed
Add links to each of the examples
1 parent 1eacf23 commit e23a669

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

doc/modules/ROOT/pages/examples.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ https://www.boost.org/LICENSE_1_0.txt
88
= Examples
99
:idprefix: examples_
1010

11-
All examples can be found in the library `examples/` folder as well.
11+
The following examples will help you get up and running with many of the major parts of the library.
12+
All of these examples can be found in the library `examples/` folder as well.
1213

1314
[#examples_construction]
1415
== Basic Construction
15-
.This example demonstrates the basic use of the various constructors offered by the decimal types
16+
.This https://github.com/cppalliance/decimal/blob/develop/examples/basic_construction.cpp[example] demonstrates the basic use of the various constructors offered by the decimal types
1617
====
1718
[source, c++]
1819
----
@@ -35,7 +36,7 @@ Can not construct from invalid string
3536
[#examples_promotion]
3637
== Promotion and Mixed Decimal Arithmetic
3738
38-
.This example demonstrates the behaviors of promotion between types, and mixed decimal type arithmetic
39+
.This https://github.com/cppalliance/decimal/blob/develop/examples/promotion.cpp[example] demonstrates the behaviors of promotion between types, and mixed decimal type arithmetic
3940
====
4041
[source, c++]
4142
----
@@ -56,7 +57,7 @@ The result of a + b is a decimal64_t: 9.1
5657
[#examples_charconv]
5758
== `<charconv>`
5859
59-
.This example demonstrates the fundamentals of the `<charconv>` like functions provided by the library
60+
.This https://github.com/cppalliance/decimal/blob/develop/examples/charconv.cpp[example] demonstrates the fundamentals of the `<charconv>` like functions provided by the library
6061
====
6162
[source, c++]
6263
----
@@ -74,7 +75,7 @@ Value in scientific format with precision 20: -7.12345000000000000000e+06
7475
7576
[#examples_generic_programming]
7677
== Generic Programming
77-
.This example demonstrates how to write generic code that accepts both built-in floating point types, and decimal floating point values from this library
78+
.This https://github.com/cppalliance/decimal/blob/develop/examples/adl.cpp[example] demonstrates how to write generic code that accepts both built-in floating point types, and decimal floating point values from this library
7879
====
7980
[source, c++]
8081
----
@@ -111,7 +112,7 @@ sin(-0.5) = -0.479426
111112

112113
[#examples_literals_constants]
113114
== Literals and Constants
114-
.This example demonstrates how to construct values using literals, and the usage of numerical constants that are provided by the library
115+
.This https://github.com/cppalliance/decimal/blob/develop/examples/literals.cpp[example] demonstrates how to construct values using literals, and the usage of numerical constants that are provided by the library
115116
====
116117
[source, c++]
117118
----
@@ -138,7 +139,7 @@ pass:[{fmt}] support is available starting with pass:[C++14] so long as you have
138139
[#examples_fmt_format]
139140
=== `<fmt/format.hpp>`
140141

141-
.This example demonstrates the various formatting options provided by the library to support usage of pass:[{fmt}]
142+
.This https://github.com/cppalliance/decimal/blob/develop/examples/fmt_format.cpp[example] demonstrates the various formatting options provided by the library to support usage of pass:[{fmt}]
142143
====
143144
[source, c++]
144145
----
@@ -212,7 +213,7 @@ You must include it yourself.
212213

213214
Taking the above example of pass:[{fmt}] and replacing all instances of `namespace fmt` with `namespace std` gives us another working example.
214215

215-
.This example demonstrates how to use `<format>` with the library in-place or in addition to pass:[{fmt}]
216+
.This https://github.com/cppalliance/decimal/blob/develop/examples/format.cpp[example] demonstrates how to use `<format>` with the library in-place or in addition to pass:[{fmt}]
216217
====
217218
[source, c++]
218219
----
@@ -242,7 +243,7 @@ Scientific Format with Specified Precision and Padding:
242243

243244
[#examples_print]
244245
=== `<print>`
245-
.This example demonstrates how to use `<print>` with the library
246+
.This https://github.com/cppalliance/decimal/blob/develop/examples/print.cpp[example] demonstrates how to use `<print>` with the library
246247
====
247248
[source, c++]
248249
----

doc/modules/ROOT/pages/financial_examples.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ https://www.boost.org/LICENSE_1_0.txt
88
= Financial Examples
99
:idprefix: financial_examples_
1010

11+
Below are a few additional examples as to how the Decimal library can be used in the context of financial applications.
12+
All of these examples can be found in the library `examples/` folder as well.
13+
1114
== Parsing Pricing Data from File
1215
[#examples_money_parsing]
1316
.This https://github.com/cppalliance/decimal/blob/develop/examples/numerical_parsing.cpp[example] demonstrates the numerical differences between parsing of monetary values between using `decimal32_t` and `float`

0 commit comments

Comments
 (0)