summaryrefslogtreecommitdiff
path: root/libs/tr1/doc/tr1.qbk
blob: c4bdaa4e5ece3d12054632177b997aa6c6e9cd7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
[library Boost.TR1
    [quickbook 1.4]
    [copyright 2005 John Maddock]
    [purpose An implementation of the C++ Technical Report on Standard Library Extensions]
    [license
        Distributed under the Boost Software License, Version 1.0.
        (See accompanying file LICENSE_1_0.txt or copy at
        [@http://www.boost.org/LICENSE_1_0.txt])]
    [authors [Maddock, John]]
    [category misc]
    [last-revision $Date: 2011-04-25 11:56:08 -0400 (Mon, 25 Apr 2011) $]
]

[section:intro Introduction]
The TR1 library provides an implementation of the C++ Technical Report on Standard Library Extensions.
This library does not itself implement the TR1 components, rather it's a thin wrapper that will 
include your standard library's TR1 implementation (if it has one), otherwise it will include the Boost
Library equivalents, and import them into namespace `std::tr1`.

[endsect]

[section:usage Usage]
There are two things you need to decide before using the Boost.TR1 library: 
whether to use your standard library's native TR1 implementation (if it has one),
and which include style to use.

[section:native Whether to use Your Native TR1 Library]
If your standard library implements the TR1, and you want to make
use of it, rather than use the Boost equivalents, then you will need to
take some explicit action to enable it: this may be a pre-processor
define, a special compiler switch, or a different include path.
You will need to consult your compilers documentation to find out 
which of these
actions you need to take.

Provided Boost is [link boost_tr1.config correctly configured], 
everything should
now "just work", and code written to use Boost.TR1 will include
your standard library's native headers rather than the Boost ones.

[endsect]

[section:include_style Header Include Style]

There are two ways you can include the Boost.TR1 headers, 
for example if you are interested in shared_ptr then you can either use:

   #include <boost/tr1/memory.hpp>
   
or:

   #include <memory>
   
The first option is the preferred method for other Boost libraries
to use.  The second option is standard-conforming, but requires that you
add `boost-install-path/boost/tr1/tr1` to your compiler's include search path.  
Note that you must not copy the headers in boost/tr1/tr1 into a directory
called "include", doing so will cause them to cease working.

[blurb [*Important Note #1]

The include path order is very important if you want this library to work 
correctly.  If you get compiler errors then suspect the include paths.  The
correct order is:

1) boost-root/boost/tr1/tr1\n
2) boost-root\n
3) Any other standard library replacements (STLport for example).\n
4) Your regular standard library.\n
]

[blurb [*Important Note #2: GNU C++ Users]

Normally this library should "just work" with the GNU C++ compiler.

However, if Boost is installed in `/usr/include` then you may get an error
message of the form:

``In file included from /usr/include/boost/tr1/tuple.hpp:5,
                 from boost-failure.cxx:1:
/usr/include/boost/tr1/detail/config.hpp:60:26: error: no include path in which to search for utility``

In this case try defining the macro `BOOST_TR1_DISABLE_INCLUDE_NEXT` when building,
and if that doesn't work, define the macro `BOOST_TR1_GCC_INCLUDE_PATH` to the 
name of the directory containing gcc's include files: this is likely to be 
something like "g++-v4" but unfortunately varies from distribution 
to distribution.
]

[blurb [*Important Note #3: Borland C++ Users]

Borland's compiler has a particularly broken form of `#include`, that
will actually look for a file named `array.h` if you `#include <array>`.
In order to make this library work with Borland's compiler you will need to
set up the include paths as follows:

1) boost-root/boost/tr1/tr1/bcc32\n
2) boost-root/boost/tr1/tr1\n
3) boost-root\n
4) Any other standard library replacements (STLport for example).\n
5) Your regular standard library.\n
]

[blurb [*Important Note #4: Sun C++ Users]

Sun's compiler has a particularly interesting form of `#include`, that
will actually look for a file named `array.SUNWCCh` if you `#include <array>`.
What's more it won't include a standard header file that it thinks it's
already seen.
In order to make this library work with Sun's compiler you can either
pass the undocumented compiler switch ['"-Qoption ccfe -nosunwcch"] to
the compiler, or else you will need to
set up the include paths as follows:

1) boost-root/boost/tr1/tr1/sun\n
2) boost-root/boost/tr1/tr1\n
3) boost-root\n
4) Any other standard library replacements (STLport for example).\n
5) Your regular standard library.\n
]

[endsect]

[section:writing_code Writing Code]

Regardless of how the includes are setup, user code written to work 
with Boost.TR1 is exactly the same as code written to use a native 
tr1 implementation.  That is, references to classes and functions
need to explicitly use the `std::tr1` namespace or a `using namespace std::tr1`
statement.  For example, 

   std::tr1::tuple<int, std::string> t = std::tr1::make_tuple(10, "hello");

or

  using namespace std::tr1;
  tuple<int, std::string> t = make_tuple(10, "hello");


[endsect]


[endsect]

[section:config Configuration]

Configuring Boost.TR1 is no different to configuring any other part of
Boost; in the majority of cases you shouldn't actually need to do anything at all.
However, because Boost.TR1 will inject Boost components into namespace std::tr1
it is more than usually sensitive to an incorrect configuration.

The intention is that 
[@../../libs/config/index.html Boost.Config] 
will automatically define the configuration
macros used by this library, so that if your standard library is set up to
support TR1 (note that few are at present) then this will be detected and Boost.TR1
will use your standard library versions of these components rather than the 
Boost ones.

If you would prefer to use the Boost versions of the TR1 conponents rather than
your standard library, then either: include the Boost headers directly

   #include <boost/regex.hpp>
   
   boost::regex e("myregex"); //etc
   
Or else don't enable TR1 in your standard library: since TR1 is not part of
the current standard, there should be some option to disable it in your
compiler or standard library.

The configuration macros used by each TR1 component are documented in each
library section (and all together in the 
[@../../libs/config/index.html Boost.Config] 
documentation), but defining BOOST_HAS_TR1 will turn on native TR1 support
for everything (if your standard library has it), which can act as a 
convenient shortcut.

[blurb [*Note for gcc users]\n\n
Boost.TR1 does not currently enable gcc's native TR1 implementation
as this is currently in an early stage of development.  However, you may
choose to do so by defining BOOST_HAS_GCC_TR1.]

[endsect]

[section:subject_list TR1 By Subject]

[section:ref Reference Wrappers.]
   
   #include <boost/tr1/functional.hpp>

or

   #include <functional>
   
The Ref library is a small library that is useful for passing
references to function templates (algorithms) that would usually
take copies of their arguments. It defines the class template
`reference_wrapper<T>`,
and the two functions
`ref` and `cref` that return
instances of `reference_wrapper<T>`.
[@../../doc/html/ref.html Refer to Boost.Bind for more information.]

   namespace std {
   namespace tr1 {

   template <class T> class reference_wrapper;

   template <class T> reference_wrapper<T> ref(T&);
   template <class T> reference_wrapper<const T> cref(const T&);
   template <class T> reference_wrapper<T> ref(reference_wrapper<T>);
   template <class T> reference_wrapper<const T> cref(reference_wrapper<T>);

   } // namespace tr1
   } // namespace std

[*Configuration:] 
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_REFERENCE_WRAPPER if your
standard library implements this part of TR1.

[*Standard Conformity:]
The Boost version of this this component does not currently support
function call invocation (2.1.2.4), or derivation from std::unary_function 
or std::binary_function (2.1.2 paragraphs 3 and 4).

The Boost version is not implicitly convertible to T& as the TR requires.

[endsect]

[section:ptrs Smart Pointers.]

   #include <boost/tr1/memory.hpp>

or

   #include <memory>

The `shared_ptr` class template stores a pointer to a dynamically allocated 
object, typically with a C++ new-expression. The object pointed to is 
guaranteed to be deleted when the last `shared_ptr` pointing to it is 
destroyed or reset. For more information refer to the 
[@../../libs/smart_ptr/shared_ptr.htm shared_ptr]
and [@../../libs/smart_ptr/weak_ptr.htm weak_ptr] documentation.
   
   namespace std {
   namespace tr1 {

   class bad_weak_ptr;

   // [2.2.3] Class template shared_ptr
   template<class T> class shared_ptr;

   // [2.2.3.6] shared_ptr comparisons
   template<class T, class U> bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b);
   template<class T, class U> bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b);
   template<class T, class U> bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b);

   // [2.2.3.8] shared_ptr specialized algorithms
   template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);

   // [2.2.3.9] shared_ptr casts
   template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r);
   template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r);
   template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r);

   // [2.2.3.7] shared_ptr I/O
   template<class E, class T, class Y>
   basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p);

   // [2.2.3.10] shared_ptr get_deleter
   template<class D, class T> D * get_deleter(shared_ptr<T> const& p);

   // [2.2.4] Class template weak_ptr
   template<class T> class weak_ptr;

   // [2.2.4.6] weak_ptr comparison
   template<class T, class U> bool operator<(weak_ptr<T> const& a, weak_ptr<U> const& b);

   // [2.2.4.7] weak_ptr specialized algorithms
   template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b);

   // [2.2.5] Class enable_shared_from_this
   template<class T> class enable_shared_from_this;

   } // namespace tr1
   } // namespace std

[*Configuration:] 
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_SHARED_PTR if your
standard library implements this part of TR1.

[*Standard Conformity:] There are no known deviations from the standard when 
using the Boost version of this component.

[endsect]

[section:result_of Class template result_of.]

   #include <boost/tr1/functional.hpp>
   
or

   #include <functional>

The class template
`result_of` helps determine the type of a
call expression. Given an lvalue `f` of
type `F` and lvalues `t1`,
`t2, ..., tN` of
types `T1, T2, ..., TN`, respectively, the type
`result_of<F(T1, T2, ..., TN)>::type` defines the result type
of the expression `f(t1, t2, ...,tN)`. The implementation permits
the type `F` to be a function pointer,
function reference, member function pointer, or class
type.  For more information 
[@../../libs/utility/utility.htm#result_of refer to the Boost.Utility documentation.]

   namespace std {
   namespace tr1 {

   template <class T>
   struct result_of
   {
      typedef unspecified type;
   };

   } // namespace tr1
   } // namespace std

[*Configuration:] 
[@../../libs/config/index.html Boost.Config] should (automatically) define 
the macro BOOST_HAS_TR1_RESULT_OF if your
standard library implements this part of TR1.
   
[*Standard Conformity:] No known problems.

[endsect]

[section:mem_fn Function template mem_fn.]

   #include <boost/tr1/functional.hpp>
   
or

   #include <functional>

`std::tr1::mem_fn` is a generalization of the standard functions `std::mem_fun`
and `std::mem_fun_ref`. It supports member function pointers with more 
than one argument, and the returned function object can take a pointer, a 
reference, or a smart pointer to an object instance as its first argument. `mem_fn`
also supports pointers to data members by treating them as functions taking no 
arguments and returning a (const) reference to the member.
For more information refer to the [@../../libs/bind/mem_fn.html
Boost.Mem_fn documentation].

   namespace std {
   namespace tr1 {

   template <class R, class T> unspecified mem_fn(R T::* pm);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define 
the macro BOOST_HAS_TR1_MEM_FN if your
standard library implements this part of TR1.

[*Standard Conformity:]
The Boost implementation does not produce functors that inherit from
`std::unary_function` or `std::binary_function`, nor does it function
correctly with pointers to volatile member functions (these should
be extremely rare in practice however).

[endsect]

[section:bind Function Object Binders.]

   #include <boost/tr1/functional.hpp>

or

   #include <functional>

`std::tr1::bind` is a generalization of the standard functions `std::bind1st`
and `std::bind2nd`. It supports arbitrary function objects, functions, 
function pointers, and member function pointers, and is able to bind any 
argument to a specific value or route input arguments into arbitrary positions. `bind`
does not place any requirements on the function object; in particular, it does 
not need the `result_type`, `first_argument_type` and `second_argument_type`
standard typedefs.
For more information refer to the [@../../libs/bind/bind.html 
Boost.Bind documentation].

   namespace std {
   namespace tr1 {

   // [3.6] Function object binders
   template<class T> struct is_bind_expression;
   template<class T> struct is_placeholder;
   template<class F, class T1, ..., class Tn > unspecified bind(F f, T1 t1, ..., Tn tn );
   template<class R, class F, class T1, ..., class Tn > unspecified bind(F f, T1 t1, ..., Tn tn );

   namespace placeholders {
      // M is the implementation-defined number of placeholders
      extern unspecified _1;
      extern unspecified _2;
      .
      .
      .
      extern unspecified _M;
   }

   } // namespace tr1
   } // namespace std

[*Configuration:] 
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_BIND if your
standard library implements this part of TR1.

[*Standard Conformity:]
The traits classes `is_placeholder` and `is_bind_expression` are not supported
by the Boost implementation.

The named return value syntax isn't supported if the object being bound is a 
function pointer, for example:

   std::tr1::bind(&my_proc, arg1, arg2 /* etc */); // works OK.
   std::tr1::bind<double>(&my_proc, arg1, arg2 /* etc */); // causes compiler error.
   std::tr1::bind<double>(my_function_object, arg1, arg2 /* etc */); // works OK.

On the other hand, the Boost implementation does work with pointers to overloaded
functions, and optionally with function pointers with non-standard
calling conventions.

[endsect]

[section:function Polymorphic function wrappers.]

   #include <boost/tr1/functional.hpp>

or

   #include <functional>

The polymorphic function wrappers are a family of class templates
that may be used as a generalized callback mechanism. 
A polymorphic function wrapper shares features with function pointers, in
that both define a call interface (for example a function taking two integer
arguments and returning a floating-point value) through which some
arbitrary code may be called. However a polymorphic function wrapper can call
any callable object with a compatible call signature, this could be a function 
pointer, or it could be a function object produced by std::tr1::bind, or some
other mechanism.  For more information see the [@../../doc/html/function.html
Boost.Function documentation].

   
   namespace std {
   namespace tr1 {

   // [3.7] polymorphic function wrappers
   class bad_function_call;

   template<class Function> 
   class function;

   template<class Function>
   void swap(function<Function>&, function<Function>&);

   template<class Function1, class Function2>
   void operator==(const function<Function1>&, const function<Function2>&);
   template<class Function1, class Function2>
   void operator!=(const function<Function1>&, const function<Function2>&);
   template <class Function>
   bool operator==(const function<Function>&, unspecified-null-pointer-type );
   template <class Function>
   bool operator==(unspecified-null-pointer-type , const function<Function>&);
   template <class Function>
   bool operator!=(const function<Function>&, unspecified-null-pointer-type );
   template <class Function>
   bool operator!=(unspecified-null-pointer-type , const function<Function>&);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_FUNCTION if your
standard library implements this part of TR1.

[*Standard Conformity:]
The Boost version of `std::tr1::function` lacks the member function
`target_type()` and does not inherit from `std::unary_function`
or `std::binary_function` when applicable. The member function 
target() can only access pointer-to-member targets when they 
have been wrapped in mem_fn.

[endsect]

[section:type_traits Type Traits.]

   #include <boost/tr1/type_traits.hpp>

or

   #include <type_traits>

Type traits enable generic code to access the fundamental properties
of a type, to determine the relationship between two types, or to
transform one type into another related type.  For more information
refer to the [@../../libs/type_traits/index.html Boost.Type_traits documentation].
   
   namespace std {
   namespace tr1 {

   template <class T, T v> struct integral_constant;

   typedef integral_constant<bool, true> true_type;
   typedef integral_constant<bool, false> false_type;

   // [4.5.1] primary type categories:
   template <class T> struct is_void;
   template <class T> struct is_integral;
   template <class T> struct is_floating_point;
   template <class T> struct is_array;
   template <class T> struct is_pointer;
   template <class T> struct is_reference;
   template <class T> struct is_member_object_pointer;
   template <class T> struct is_member_function_pointer;
   template <class T> struct is_enum;
   template <class T> struct is_union;
   template <class T> struct is_class;
   template <class T> struct is_function;

   // [4.5.2] composite type categories:
   template <class T> struct is_arithmetic;
   template <class T> struct is_fundamental;
   template <class T> struct is_object;
   template <class T> struct is_scalar;
   template <class T> struct is_compound;
   template <class T> struct is_member_pointer;

   // [4.5.3] type properties:
   template <class T> struct is_const;
   template <class T> struct is_volatile;
   template <class T> struct is_pod;
   template <class T> struct is_empty;
   template <class T> struct is_polymorphic;
   template <class T> struct is_abstract;
   template <class T> struct has_trivial_constructor;
   template <class T> struct has_trivial_copy;
   template <class T> struct has_trivial_assign;
   template <class T> struct has_trivial_destructor;
   template <class T> struct has_nothrow_constructor;
   template <class T> struct has_nothrow_copy;
   template <class T> struct has_nothrow_assign;
   template <class T> struct has_virtual_destructor;
   template <class T> struct is_signed;
   template <class T> struct is_unsigned;
   template <class T> struct alignment_of;
   template <class T> struct rank;
   template <class T, unsigned I = 0> struct extent;

   // [4.6] type relations:
   template <class T, class U> struct is_same;
   template <class Base, class Derived> struct is_base_of;
   template <class From, class To> struct is_convertible;

   // [4.7.1] const-volatile modifications:
   template <class T> struct remove_const;
   template <class T> struct remove_volatile;
   template <class T> struct remove_cv;
   template <class T> struct add_const;
   template <class T> struct add_volatile;
   template <class T> struct add_cv;

   // [4.7.2] reference modifications:
   template <class T> struct remove_reference;
   template <class T> struct add_reference;

   // [4.7.3] array modifications:
   template <class T> struct remove_extent;
   template <class T> struct remove_all_extents;

   // [4.7.4] pointer modifications:
   template <class T> struct remove_pointer;
   template <class T> struct add_pointer;

   // [4.8] other transformations:
   template <std::size_t Len, std::size_t Align> struct aligned_storage;

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_TYPE_TRAITS if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known problems.

[endsect]

[section:random Random Number Generators and Distributions.]

   #include <boost/tr1/random.hpp>
   
or

   #include <random>

The random number library is divided into three parts: 
[@../../libs/random/random-generators.html generators], which
are nullary functors producing uniform random number distributions.  
[@../../libs/random/random-distributions.html Distributions], which are unary 
functors that adapt a generator to some
specific kind of distribution.  And the class template 
[@../../libs/random/random-variate.html variate_generator]
which combines a generator with a distribution, to create a new generator.
For more information see the [@../../libs/random/index.html Boost.Random documentation].

   
   namespace std {
   namespace tr1 {

   // [5.1.3] Class template variate_generator
   template<class UniformRandomNumberGenerator, class Distribution>
   class variate_generator;

   // [5.1.4.1] Class template linear_congruential
   template<class IntType, IntType a, IntType c, IntType m>
   class linear_congruential;

   // [5.1.4.2] Class template mersenne_twister
   template<class UIntType, int w, int n, int m, int r,
   UIntType a, int u, int s, UIntType b, int t, UIntType c, int l>
   class mersenne_twister;

   // [5.1.4.3] Class template substract_with_carry
   template<class IntType, IntType m, int s, int r>
   class subtract_with_carry;

   // [5.1.4.4] Class template substract_with_carry_01
   template<class RealType, int w, int s, int r>
   class subtract_with_carry_01;

   // [5.1.4.5] Class template discard_block
   template<class UniformRandomNumberGenerator, int p, int r>
   class discard_block;

   // [5.1.4.6] Class template xor_combine
   template<class UniformRandomNumberGenerator1, int s1,
   class UniformRandomNumberGenerator2, int s2>
   class xor_combine;
   
   // [5.1.5] Predefined generators
   typedef linear_congruential<
               implementation-defined , 
               16807, 
               0, 
               2147483647> minstd_rand0;
               
   typedef linear_congruential<
               implementation-defined , 
               48271, 
               0, 
               2147483647> minstd_rand;
               
   typedef mersenne_twister<
               implementation-defined ,
               32, 624, 397, 31, 
               0x9908b0df, 11, 7, 
               0x9d2c5680, 15, 
               0xefc60000, 18> mt19937;
               
   typedef subtract_with_carry_01<
               float, 
               24, 
               10, 
               24> ranlux_base_01;
               
   typedef subtract_with_carry_01<
               double, 
               48, 
               10, 
               24> ranlux64_base_01;
               
   typedef discard_block<
               subtract_with_carry<
                     implementation-defined , 
                     (1<<24), 
                     10, 
                     24>, 
               223, 
               24> ranlux3;
               
   typedef discard_block<
               subtract_with_carry<
                     implementation-defined, 
                     (1<<24), 
                     10, 
                     24>, 
               389, 
               24> ranlux4;
               
   typedef discard_block<
               subtract_with_carry_01<
                     float, 
                     24, 
                     10, 
                     24>, 
               223, 
               24> ranlux3_01;
               
   typedef discard_block<
               subtract_with_carry_01<
                     float, 
                     24, 
                     10, 
                     24>, 
               389, 
               24> ranlux4_01;
   
   // [5.1.6] Class random_device
   class random_device;

   // [5.1.7.1] Class template uniform_int
   template<class IntType = int>
   class uniform_int;

   // [5.1.7.2] Class bernoulli_distribution
   class bernoulli_distribution;

   // [5.1.7.3] Class template geometric_distribution
   template<class IntType = int, class RealType = double>
   class geometric_distribution;

   // [5.1.7.4] Class template poisson_distribution
   template<class IntType = int, class RealType = double>
   class poisson_distribution;

   // [5.1.7.5] Class template binomial_distribution
   template<class IntType = int, class RealType = double>
   class binomial_distribution;

   // [5.1.7.6] Class template uniform_real
   template<class RealType = double>
   class uniform_real;

   // [5.1.7.7] Class template exponential_distribution
   template<class RealType = double>
   class exponential_distribution;

   // [5.1.7.8] Class template normal_distribution
   template<class RealType = double>
   class normal_distribution;

   // [5.1.7.9] Class template gamma_distribution
   template<class RealType = double>
   class gamma_distribution;

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_RANDOM if your
standard library implements this part of TR1.

[*Standard Conformity:]
The Boost implementation has the following limitations:

*The linear_congruential generator is fully supported for 
signed integer types only (unsigned types probably only work when 
the modulus is zero).
*The subtract_with_carry template does not support a modulus of zero.
*Not all of the standard generator types have Boost documentation yet, they are
none the less supported however.
*Class template variate_generator does not have a template unary function call operator(), 
only the non-template nullary version.

Note also that most of the Random number generators have been re-implemented 
as thin wrappers around the Boost versions in order to
provide a standard conforming interface (the Boost versions all take an additional,
redundant, template parameter, and are initialized by iterators rather than functors).

[endsect]

[section:tuple Tuples.]

   #include <boost/tr1/tuple.hpp>

or
   
   #include <tuple>

A tuple is a fixed size collection of elements. 
Pairs, triples, quadruples etc. are tuples. 
In a programming language, a tuple is a data object containing other objects as elements. 
These element objects may be of different types.
Tuples are convenient in many circumstances. 
For instance, tuples make it easy to define functions that return more than one value.
Some programming languages, such as ML, Python and Haskell, have built-in tuple constructs. 
Unfortunately C++ does not.
To compensate for this "deficiency", the TR1 Tuple Library implements a tuple construct using templates.
For more information see the [@../../libs/tuple/index.html Boost Tuple Library Documentation].

   namespace std {
   namespace tr1 {

   // [6.1.3] Class template tuple
   template <class T1 = unspecified ,
   class T2 = unspecified ,
   ...,
   class TM = unspecified > class tuple;

   // [6.1.3.2] Tuple creation functions
   const unspecified ignore;

   template<class T1, class T2, ..., class TN>
   tuple<V1, V2, ..., VN> make_tuple(const T1&, const T2& , ..., const TN&);

   // [6.1] Tuple types Containers
   template<class T1, class T2, ..., class TN>
   tuple<T1&, T2&, ..., TN&> tie(T1&, T2& , ..., TN&);

   // [6.1.3.3] Tuple helper classes
   template <class T> class tuple_size;
   template <int I, class T> class tuple_element;

   // [6.1.3.4] Element access
   template <int I, class T1, class T2, ..., class TN>
   RI get(tuple<T1, T2, ..., TN>&);
   template <int I, class T1, class T2, ..., class TN>
   PI get(const tuple<T1, T2, ..., TN>&);

   // [6.1.3.5] relational operators
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator==(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator<(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator!=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator>(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator<=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);
   template<class T1, class T2, ..., class TM, class U1, class U2, ..., class UM>
   bool operator>=(const tuple<T1, T2, ..., TM>&, const tuple<U1, U2, ..., UM>&);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_TUPLE if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known issues for conforming compilers.

[endsect]

[section:utility Tuple Interface to std::pair.]

   #include <boost/tr1/utility.hpp>

or

   #include <utility>

The existing class template std::pair, can also be accessed using the 
[link boost_tr1.subject_list.tuple tuple interface].
   
   namespace std {
   namespace tr1 {

   template <class T> class tuple_size; // forward declaration
   template <int I, class T> class tuple_element; // forward declaration
   template <class T1, class T2> struct tuple_size<std::pair<T1, T2> >;
   template <class T1, class T2> struct tuple_element<0, std::pair<T2, T2> >;
   template <class T1, class T2> struct tuple_element<1, std::pair<T2, T2> >;
   // see below for definition of "P".
   template<int I, class T1, class T2> P& get(std::pair<T1, T2>&);
   template<int I, class T1, class T2> const P& get(const std::pair<T1, T2>&);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_UTILITY if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known problems.

[endsect]

[section:array Fixed Size Array.]

   #include <boost/tr1/array.hpp>
   
or

   #include <array>
   
Class template array is a fixed size array that is safer than and no
less efficient than a C style array.  Class array fulfils almost all of the
requirements of a reversible-container (see Section 23.1, 
[lib.container.requirements] of the C++ Standard).  For more information refer
to the [@../../libs/array/index.html Boost.Array documentation].

   namespace std {
   namespace tr1 {

   // [6.2.2] Class template array
   template <class T, size_t N > struct array;

   // Array comparisons
   template <class T, size_t N> bool operator== (const array<T,N>& x, const array<T,N>& y);
   template <class T, size_t N> bool operator< (const array<T,N>& x, const array<T,N>& y);
   template <class T, size_t N> bool operator!= (const array<T,N>& x, const array<T,N>& y);
   template <class T, size_t N> bool operator> (const array<T,N>& x, const array<T,N>& y);
   template <class T, size_t N> bool operator>= (const array<T,N>& x, const array<T,N>& y);
   template <class T, size_t N> bool operator<= (const array<T,N>& x, const array<T,N>& y);

   // [6.2.2.2] Specialized algorithms
   template <class T, size_t N > void swap(array<T,N>& x, array<T,N>& y);

   // [6.2.2.5] Tuple interface to class template array
   template <class T> class tuple_size; // forward declaration
   template <int I, class T> class tuple_element; // forward declaration
   template <class T, size_t N> struct tuple_size<array<T, N> >;
   template <int I, class T, size_t N> struct tuple_element<I, array<T, N> >;
   template <int I, class T, size_t N> T& get( array<T, N>&);
   template <int I, class T, size_t N> const T& get(const array<T, N>&);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_ARRAY if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known issues as of Boost-1.34 onwards.

[endsect]

[section:hash Hash Function Objects.]

   #include <boost/tr1/functional.hpp>
   
or

   #include <functional>

Class template std::hash is a unary-functor that converts some type T 
into a hash-value,
specializations of std::hash are provided for integer, character, floating point, 
and pointer types, plus the two string types std::string and std::wstring.
See the [@../../libs/functional/hash/index.html Boost.Hash] 
documentation for more information.
   
   namespace std {
   namespace tr1 {

   template <class T> 
   struct hash : public unary_function<T, size_t>
   {
      size_t operator()(T val)const;
   };

   // Hash function specializations
   template <> struct hash<bool>;
   template <> struct hash<char>;
   template <> struct hash<signed char>;
   template <> struct hash<unsigned char>;
   template <> struct hash<wchar_t>;
   template <> struct hash<short>;
   template <> struct hash<int>;
   template <> struct hash<long>;
   template <> struct hash<unsigned short>;
   template <> struct hash<unsigned int>;
   template <> struct hash<unsigned long>;
   template <> struct hash<float>;
   template <> struct hash<double>;
   template <> struct hash<long double>;
   template<class T> struct hash<T*>;
   template <> struct hash<std::string>;
   template <> struct hash<std::wstring>;

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_HASH if your
standard library implements this part of TR1.

[*Standard Conformity:]
Boost.Hash adds specialisations of std::hash for a wider range of types
than those required by TR1: Boost.Hash acts as a testbed for issue 6.18
in the [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf 
Library Extension Technical Report Issues List].

[note There are portability issues with this template - in particular the `hash` template
might not actually be defined inside namespace std::tr1, making user-defined specializations
of the template non-portable.  For example Visual C++ 2010 defines `hash` in namespace `std`
and then imports this into `std::tr1` with a using declaration.]

[endsect]

[section:regex Regular Expressions.]

   #include <boost/tr1/regex.hpp>
   
or

   #include <regex>
   
This library provides comprehensive support for regular expressions,
including either iterator or string based matching, searching, search-and-replace,
iteration, and tokenization.  Both POSIX and ECMAScript (JavaScript) regular
expressions are supported.  For more information see the [@../../libs/regex/index.html
Boost.Regex documentation].
   
   namespace std {
   namespace tr1 {

   // [7.5] Regex constants
   namespace regex_constants {

   typedef bitmask_type syntax_option_type;
   typedef bitmask_type match_flag_type;
   typedef implementation-defined error_type;

   } // namespace regex_constants

   // [7.6] Class regex_error
   class regex_error;

   // [7.7] Class template regex_traits
   template <class charT> struct regex_traits;

   // [7.8] Class template basic_regex
   template <class charT, class traits = regex_traits<charT> > 
   class basic_regex;

   typedef basic_regex<char> regex;
   typedef basic_regex<wchar_t> wregex;

   // [7.8.6] basic_regex swap
   template <class charT, class traits>
   void swap(basic_regex<charT, traits>& e1,
            basic_regex<charT, traits>& e2);
             
   // [7.9] Class template sub_match
   template <class BidirectionalIterator>
   class sub_match;

   typedef sub_match<const char*> csub_match;
   typedef sub_match<const wchar_t*> wcsub_match;
   typedef sub_match<string::const_iterator> ssub_match;
   typedef sub_match<wstring::const_iterator> wssub_match;

   // [7.9.2] sub_match non-member operators

   /* Comparison operators omitted for clarity.... */

   template <class charT, class ST, class BiIter>
   basic_ostream<charT, ST>&
      operator<<(basic_ostream<charT, ST>& os, 
               const sub_match<BiIter>& m);

   // [7.10] Class template match_results
   template <class BidirectionalIterator,
            class Allocator = allocator<sub_match<BidirectionalIterator> > >
   class match_results;

   typedef match_results<const char*> cmatch;
   typedef match_results<const wchar_t*> wcmatch;
   typedef match_results<string::const_iterator> smatch;
   typedef match_results<wstring::const_iterator> wsmatch;

   // match_results comparisons
   template <class BidirectionalIterator, class Allocator>
   bool operator== (const match_results<BidirectionalIterator, Allocator>& m1,
                  const match_results<BidirectionalIterator, Allocator>& m2);
   template <class BidirectionalIterator, class Allocator>
   bool operator!= (const match_results<BidirectionalIterator, Allocator>& m1,
                  const match_results<BidirectionalIterator, Allocator>& m2);

   // [7.10.6] match_results swap
   template <class BidirectionalIterator, class Allocator>
   void swap(match_results<BidirectionalIterator, Allocator>& m1,
            match_results<BidirectionalIterator, Allocator>& m2);
             
   // [7.11.2] Function template regex_match
   template <class BidirectionalIterator, class Allocator, class charT, class traits>
   bool regex_match(BidirectionalIterator first, 
                  BidirectionalIterator last,
                  match_results<BidirectionalIterator, Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);

   template <class BidirectionalIterator, class charT, class traits>
   bool regex_match(BidirectionalIterator first, 
                  BidirectionalIterator last,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
                    
   template <class charT, class Allocator, class traits>
   bool regex_match(const charT* str, 
                  match_results<const charT*, Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
                    
   template <class ST, class SA, class Allocator, class charT, class traits>
   bool regex_match(const basic_string<charT, ST, SA>& s,
                  match_results<typename basic_string<charT, ST, SA>::const_iterator,Allocator>& m,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
                    
   template <class charT, class traits>
   bool regex_match(const charT* str,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
                    
   template <class ST, class SA, class charT, class traits>
   bool regex_match(const basic_string<charT, ST, SA>& s,
                  const basic_regex<charT, traits>& e,
                  regex_constants::match_flag_type flags = regex_constants::match_default);
                    
   // [7.11.3] Function template regex_search
   template <class BidirectionalIterator, class Allocator, class charT, class traits>
   bool regex_search(BidirectionalIterator first, 
                     BidirectionalIterator last,
                     match_results<BidirectionalIterator, Allocator>& m,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   template <class BidirectionalIterator, class charT, class traits>
   bool regex_search(BidirectionalIterator first, 
                     BidirectionalIterator last,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   template <class charT, class Allocator, class traits>
   bool regex_search(const charT* str,
                     match_results<const charT*, Allocator>& m,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   template <class charT, class traits>
   bool regex_search(const charT* str,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   template <class ST, class SA, class charT, class traits>
   bool regex_search(const basic_string<charT, ST, SA>& s,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   template <class ST, class SA, class Allocator, class charT, class traits>
   bool regex_search(const basic_string<charT, ST, SA>& s,
                     match_results<typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
                     const basic_regex<charT, traits>& e,
                     regex_constants::match_flag_type flags = regex_constants::match_default);
                     
   // [7.11.4] Function template regex_replace
   template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
   OutputIterator regex_replace(OutputIterator out,
                              BidirectionalIterator first, 
                              BidirectionalIterator last,
                              const basic_regex<charT, traits>& e,
                              const basic_string<charT>& fmt,
                              regex_constants::match_flag_type flags = regex_constants::match_default);
                                
   template <class traits, class charT>
   basic_string<charT> regex_replace(const basic_string<charT>& s,
                                          const basic_regex<charT, traits>& e,
                                          const basic_string<charT>& fmt,
                                          regex_constants::match_flag_type flags = regex_constants::match_default);
                                           
   // [7.12.1] Class template regex_iterator
   template <class BidirectionalIterator, 
            class charT = typename iterator_traits<BidirectionalIterator>::value_type,
            class traits = regex_traits<charT> >
   class regex_iterator;

   typedef regex_iterator<const char*> cregex_iterator;
   typedef regex_iterator<const wchar_t*> wcregex_iterator;
   typedef regex_iterator<string::const_iterator> sregex_iterator;
   typedef regex_iterator<wstring::const_iterator> wsregex_iterator;

   // [7.12.2] Class template regex_token_iterator
   template <class BidirectionalIterator,
            class charT = typename iterator_traits<BidirectionalIterator>::value_type,
            class traits = regex_traits<charT> >
   class regex_token_iterator;

   typedef regex_token_iterator<const char*> cregex_token_iterator;
   typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
   typedef regex_token_iterator<string::const_iterator> sregex_token_iterator;
   typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;

   } // namespace tr1
   } // namespace std

   
[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_REGEX if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known problems.

[endsect]

[section:complex Complex Number Algorithm Overloads.]

   #include <boost/tr1/complex.hpp>
   
or

   #include <complex>
   
The following function templates have additional overloads: 
`arg`, `norm`, `conj`, `polar`, `imag`, and `real`.

The additional 
overloads are sufficient to ensure:

*If the argument has type `long double`, then the overload behaves as if 
the argument had been cast to `std::complex<long double>`.
*Otherwise, if the argument has type `double` or is an integer type, 
then the overload behaves as if 
the argument had been cast to `std::complex<double>`.
*Otherwise, if the argument has type `float`, then the overload 
behaves as if 
the argument had been cast to `std::complex<float>`.

The function template `pow` has additional overloads sufficient to ensure, 
for a call with at least one argument of type `std::complex<T>`:

*If either argument has type `complex<long double>` or type 
`long double`, then the overload behaves as if both arguments were cast
to `std::complex<long double>`
*Otherwise, if either argument has type `complex<double>`, `double`, 
or an integer type, then the overload behaves as if both arguments were cast
to `std::complex<double>`
*Otherwise, if either argument has type `complex<float>` or `float`, 
then the overload behaves as if both arguments were cast
to `std::complex<float>`

In the following synopsis, `Real` is a floating point type,
`Arithmetic` is an integer or floating point type, and `
PROMOTE(X1 ... XN)` is the largest floating point type in the list
X1 to XN, after any non-floating point types in the list have been replaced by
the type `double`.

   template <class Arithmetic>
   PROMOTE(Arithmetic) arg(const Arithmetic& t);

   template <class Arithmetic>
   PROMOTE(Arithmetic) norm(const Arithmetic& t);

   template <class Arithmetic>
   complex<PROMOTE(Arithmetic)> conj(const Arithmetic& t);

   template <class Arithmetic1, class Arithmetic2>
   complex<PROMOTE(Arithmetic1,Arithmetic2)> polar(const Arithmetic1& rho, const Arithmetic2& theta = 0);

   template <class Arithmetic>
   PROMOTE(Arithmetic) imag(const Arithmetic& );

   template <class Arithmetic>
   PROMOTE(Arithmetic) real(const Arithmetic& t);

   template<class Real1, class Real2>
   complex<PROMOTE(Real1, Real2)> 
      pow(const complex<Real1>& x, const complex<Real2>& y);
      
   template<class Real, class Arithmetic> 
   complex<PROMOTE(Real, Arithmetic)> 
      pow (const complex<Real>& x, const Arithmetic& y);

   template<class Arithmetic, class Real> 
   complex<PROMOTE(Real, Arithmetic)> 
      pow (const Arithmetic& x, const complex<Real>& y);
   
[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_COMPLEX_OVERLOADS if your
standard library implements the additional overloads for the existing
complex arithmetic functions.

[*Standard Conformity:]
No known problems.

[endsect]

[section:complex_trig Complex Number Additional Algorithms.]

   #include <boost/tr1/complex.hpp>
   
or

   #include <complex>

The algorithms `acos`, `asin`, `atan`, 
`acosh`, `asinh`, `atanh` and `fabs`
are overloaded 
for arguments of type `std::complex<T>`.  
These algorithms are entirely
classical, and behave as specified in the C99 standard section 7.3.5.
See the [@../../libs/math/doc/complex/html/complex_number_tr1_algorithms/inverse_complex.html 
Boost.Math documentation for more information].
   
   namespace std {
   namespace tr1 {

   template<class T> complex<T> acos(complex<T>& x);
   template<class T> complex<T> asin(complex<T>& x);
   template<class T> complex<T> atan(complex<T>& x);
   template<class T> complex<T> acosh(complex<T>& x);
   template<class T> complex<T> asinh(complex<T>& x);
   template<class T> complex<T> atanh(complex<T>& x);
   template<class T> complex<T> fabs(complex<T>& x);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
if your standard library implements the additional inverse trig functions.

[*Standard Conformity:]
No known problems.

[endsect]

[section:unordered_set Unordered Associative Set (Hash Table).]

   #include <boost/tr1/unordered_set.hpp>
   
or

   #include <unordered_set>

For accessing data based on key lookup, the C++ standard library 
offers std::set, std::map, std::multiset  and std::multimap. 
These are generally implemented using balanced binary trees so that 
lookup time has logarithmic complexity. That is generally okay, 
but in many cases a hash table can perform better, as accessing 
data has constant complexity, on average. The worst case complexity 
is linear, but that occurs rarely and with some care, can be avoided.

With this in mind, the C++ Standard Library Technical Report 
introduced the unordered associative containers, which are 
implemented using hash tables, and they have now been added to 
the Working Draft of the C++ Standard.  

Refer to the 
[@../../libs/unordered/index.html Unordered Library docs] 
for more information.  
   
   namespace std {
   namespace tr1 {

   template <class Value, 
            class Hash = hash<Value>, 
            class Pred = std::equal_to<Value>,
            class Alloc = std::allocator<Value> >
   class unordered_set;

   // [6.3.4.5] Class template unordered_multiset
   template <class Value,
            class Hash = hash<Value>,
            class Pred = std::equal_to<Value>,
            class Alloc = std::allocator<Value> >
   class unordered_multiset;

   template <class Value, class Hash, class Pred, class Alloc>
   void swap(unordered_set<Value, Hash, Pred, Alloc>& x,
            unordered_set<Value, Hash, Pred, Alloc>& y);
             
   template <class Value, class Hash, class Pred, class Alloc>
   void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x,
            unordered_multiset<Value, Hash, Pred, Alloc>& y);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_UNORDERED_SET if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known issues for conforming compilers.

[endsect]

[section:unordered_map Unordered Associative Map (Hash Table).]

   #include <boost/tr1/unordered_map.hpp>
   
or

   #include <unordered_map>
   
For accessing data based on key lookup, the C++ standard library 
offers std::set, std::map, std::multiset  and std::multimap. 
These are generally implemented using balanced binary trees so that 
lookup time has logarithmic complexity. That is generally okay, 
but in many cases a hash table can perform better, as accessing 
data has constant complexity, on average. The worst case complexity 
is linear, but that occurs rarely and with some care, can be avoided.

With this in mind, the C++ Standard Library Technical Report 
introduced the unordered associative containers, which are 
implemented using hash tables, and they have now been added to 
the Working Draft of the C++ Standard.  

Refer to the 
[@../../libs/unordered/index.html Unordered Library docs] 
for more information.  

   namespace std {
   namespace tr1 {

   // [6.3.4.4] Class template unordered_map
   template <class Key,
            class T,
            class Hash = hash<Key>,
            class Pred = std::equal_to<Key>,
            class Alloc = std::allocator<std::pair<const Key, T> > >
   class unordered_map;

   // [6.3.4.6] Class template unordered_multimap
   template <class Key,
            class T,
            class Hash = hash<Key>,
            class Pred = std::equal_to<Key>,
            class Alloc = std::allocator<std::pair<const Key, T> > >
   class unordered_multimap;

   template <class Key, class T, class Hash, class Pred, class Alloc>
   void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
            unordered_map<Key, T, Hash, Pred, Alloc>& y);
             
   template <class Key, class T, class Hash, class Pred, class Alloc>
   void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
            unordered_multimap<Key, T, Hash, Pred, Alloc>& y);

   } // namespace tr1
   } // namespace std

[*Configuration:]
[@../../libs/config/index.html Boost.Config] should (automatically) define
the macro BOOST_HAS_TR1_UNORDERED_MAP if your
standard library implements this part of TR1.

[*Standard Conformity:]
No known issues for conforming compilers.

[endsect]

[section:special Mathematical Special Functions.]

The TR adds 23 special functions (plus float and long double overloads)
to header <cmath>.

Refer to the 
[@../../libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html Math Library docs] 
for more information.  

   
   namespace std {
   namespace tr1 {

   // [5.2.1.1] associated Laguerre polynomials:
   double assoc_laguerre(unsigned n, unsigned m, double x);
   float assoc_laguerref(unsigned n, unsigned m, float x);
   long double assoc_laguerrel(unsigned n, unsigned m, long double x);

   // [5.2.1.2] associated Legendre functions:
   double assoc_legendre(unsigned l, unsigned m, double x);
   float assoc_legendref(unsigned l, unsigned m, float x);
   long double assoc_legendrel(unsigned l, unsigned m, long double x);

   // [5.2.1.3] beta function:
   double beta(double x, double y);
   float betaf(float x, float y);
   long double betal(long double x, long double y);

   // [5.2.1.4] (complete) elliptic integral of the first kind:
   double comp_ellint_1(double k);
   float comp_ellint_1f(float k);
   long double comp_ellint_1l(long double k);

   // [5.2.1.5] (complete) elliptic integral of the second kind:
   double comp_ellint_2(double k);
   float comp_ellint_2f(float k);
   long double comp_ellint_2l(long double k);

   // [5.2.1.6] (complete) elliptic integral of the third kind:
   double comp_ellint_3(double k, double nu);
   float comp_ellint_3f(float k, float nu);
   long double comp_ellint_3l(long double k, long double nu);

   // [5.2.1.7] confluent hypergeometric functions:
   double conf_hyperg(double a, double c, double x);
   float conf_hypergf(float a, float c, float x);
   long double conf_hypergl(long double a, long double c, long double x);

   // [5.2.1.8] regular modified cylindrical Bessel functions:
   double cyl_bessel_i(double nu, double x);
   float cyl_bessel_if(float nu, float x);
   long double cyl_bessel_il(long double nu, long double x);

   // [5.2.1.9] cylindrical Bessel functions (of the first kind):
   double cyl_bessel_j(double nu, double x);
   float cyl_bessel_jf(float nu, float x);
   long double cyl_bessel_jl(long double nu, long double x);

   // [5.2.1.10] irregular modified cylindrical Bessel functions:
   double cyl_bessel_k(double nu, double x);
   float cyl_bessel_kf(float nu, float x);
   long double cyl_bessel_kl(long double nu, long double x);

   // [5.2.1.11] cylindrical Neumann functions;
   // cylindrical Bessel functions (of the second kind):
   double cyl_neumann(double nu, double x);
   float cyl_neumannf(float nu, float x);
   long double cyl_neumannl(long double nu, long double x);

   // [5.2.1.12] (incomplete) elliptic integral of the first kind:
   double ellint_1(double k, double phi);
   float ellint_1f(float k, float phi);
   long double ellint_1l(long double k, long double phi);

   // [5.2.1.13] (incomplete) elliptic integral of the second kind:
   double ellint_2(double k, double phi);
   float ellint_2f(float k, float phi);
   long double ellint_2l(long double k, long double phi);

   // [5.2.1.14] (incomplete) elliptic integral of the third kind:
   double ellint_3(double k, double nu, double phi);
   float ellint_3f(float k, float nu, float phi);
   long double ellint_3l(long double k, long double nu, long double phi);

   // [5.2.1.15] exponential integral:
   double expint(double x);
   float expintf(float x);
   long double expintl(long double x);

   // [5.2.1.16] Hermite polynomials:
   double hermite(unsigned n, double x);
   float hermitef(unsigned n, float x);
   long double hermitel(unsigned n, long double x);

   // [5.2.1.17] hypergeometric functions:
   double hyperg(double a, double b, double c, double x);
   float hypergf(float a, float b, float c, float x);
   long double hypergl(long double a, long double b, long double c, long double x);

   // [5.2.1.18] Laguerre polynomials:
   double laguerre(unsigned n, double x);
   float laguerref(unsigned n, float x);
   long double laguerrel(unsigned n, long double x);

   // [5.2.1.19] Legendre polynomials:
   double legendre(unsigned l, double x);
   float legendref(unsigned l, float x);
   long double legendrel(unsigned l, long double x);

   // [5.2.1.20] Riemann zeta function:
   double riemann_zeta(double);
   float riemann_zetaf(float);
   long double riemann_zetal(long double);

   // [5.2.1.21] spherical Bessel functions (of the first kind):
   double sph_bessel(unsigned n, double x);
   float sph_besself(unsigned n, float x);
   long double sph_bessell(unsigned n, long double x);

   // [5.2.1.22] spherical associated Legendre functions:
   double sph_legendre(unsigned l, unsigned m, double theta);
   float sph_legendref(unsigned l, unsigned m, float theta);
   long double sph_legendrel(unsigned l, unsigned m, long double theta);

   // [5.2.1.23] spherical Neumann functions;
   // spherical Bessel functions (of the second kind):
   double sph_neumann(unsigned n, double x);
   float sph_neumannf(unsigned n, float x);
   long double sph_neumannl(unsigned n, long double x);

   } // namespace tr1
   } // namespace std


[*Standard Conformity:]
The following functions are not supported in the Boost version of this component:

   // [5.2.1.7] confluent hypergeometric functions:
   double conf_hyperg(double a, double c, double x);
   float conf_hypergf(float a, float c, float x);
   long double conf_hypergl(long double a, long double c, long double x);

   // [5.2.1.17] hypergeometric functions:
   double hyperg(double a, double b, double c, double x);
   float hypergf(float a, float b, float c, float x);
   long double hypergl(long double a, long double b, long double c, long double x);

[endsect]

[section:c99_special C99 Mathematical Special Functions.]

The TR adds a number of special functions which were first introduced in the C99 standard
to header <cmath>.

Refer to the 
[@../../libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html Math Library docs] 
for more information.  

   
   namespace std {
   namespace tr1 {
   
      // types
      typedef floating-type double_t;
      typedef floating-type float_t;

      // functions
      double acosh(double x);
      float acoshf(float x);
      long double acoshl(long double x);

      double asinh(double x);
      float asinhf(float x);
      long double asinhl(long double x);

      double atanh(double x);
      float atanhf(float x);
      long double atanhl(long double x);

      double cbrt(double x);
      float cbrtf(float x);
      long double cbrtl(long double x);

      double copysign(double x, double y);
      float copysignf(float x, float y);
      long double copysignl(long double x, long double y);

      double erf(double x);
      float erff(float x);
      long double erfl(long double x);

      double erfc(double x);
      float erfcf(float x);
      long double erfcl(long double x);

      double exp2(double x);
      float exp2f(float x);
      long double exp2l(long double x);

      double expm1(double x);
      float expm1f(float x);
      long double expm1l(long double x);

      double fdim(double x, double y);
      float fdimf(float x, float y);
      long double fdiml(long double x, long double y);

      double fma(double x, double y, double z);
      float fmaf(float x, float y, float z);
      long double fmal(long double x, long double y, long double z);

      double fmax(double x, double y);
      float fmaxf(float x, float y);
      long double fmaxl(long double x, long double y);

      double fmin(double x, double y);
      float fminf(float x, float y);
      long double fminl(long double x, long double y);

      double hypot(double x, double y);
      float hypotf(float x, float y);
      long double hypotl(long double x, long double y);

      int ilogb(double x);
      int ilogbf(float x);
      int ilogbl(long double x);

      double lgamma(double x);
      float lgammaf(float x);
      long double lgammal(long double x);

      long long llrint(double x);
      long long llrintf(float x);
      long long llrintl(long double x);

      long long llround(double x);
      long long llroundf(float x);
      long long llroundl(long double x);

      double log1p(double x);
      float log1pf(float x);
      long double log1pl(long double x);

      double log2(double x);
      float log2f(float x);
      long double log2l(long double x);

      double logb(double x);
      float logbf(float x);
      long double logbl(long double x);

      long lrint(double x);
      long lrintf(float x);
      long lrintl(long double x);

      long lround(double x);
      long lroundf(float x);
      long lroundl(long double x);

      double nan(const char *str);
      float nanf(const char *str);
      long double nanl(const char *str);

      double nearbyint(double x);
      float nearbyintf(float x);
      long double nearbyintl(long double x);

      double nextafter(double x, double y);
      float nextafterf(float x, float y);
      long double nextafterl(long double x, long double y);

      double nexttoward(double x, long double y);
      float nexttowardf(float x, long double y);
      long double nexttowardl(long double x, long double y);

      double remainder(double x, double y);
      float remainderf(float x, float y);
      long double remainderl(long double x, long double y);

      double remquo(double x, double y, int *pquo);
      float remquof(float x, float y, int *pquo);
      long double remquol(long double x, long double y, int *pquo);

      double rint(double x);
      float rintf(float x);
      long double rintl(long double x);

      double round(double x);
      float roundf(float x);
      long double roundl(long double x);

      double scalbln(double x, long ex);
      float scalblnf(float x, long ex);
      long double scalblnl(long double x, long ex);
      double scalbn(double x, int ex);
      float scalbnf(float x, int ex);
      long double scalbnl(long double x, int ex);

      double tgamma(double x);
      float tgammaf(float x);
      long double tgammal(long double x);

      double trunc(double x);
      float truncf(float x);
      long double truncl(long double x);

      // C99 macros defined as C++ templates
      template<class T> bool signbit(T x);
      template<class T> int fpclassify(T x);
      template<class T> bool isfinite(T x);
      template<class T> bool isinf(T x);
      template<class T> bool isnan(T x);
      template<class T> bool isnormal(T x);
      template<class T> bool isgreater(T x, T y);
      template<class T> bool isgreaterequal(T x, T y);
      template<class T> bool isless(T x, T y);
      template<class T> bool islessequal(T x, T y);
      template<class T> bool islessgreater(T x, T y);
      template<class T> bool isunordered(T x, T y);

   }} // namespaces

[*Standard Conformity:]
The following functions are not supported in the Boost version of this component:

      double exp2(double x);
      float exp2f(float x);
      long double exp2l(long double x);

      double fdim(double x, double y);
      float fdimf(float x, float y);
      long double fdiml(long double x, long double y);

      double fma(double x, double y, double z);
      float fmaf(float x, float y, float z);
      long double fmal(long double x, long double y, long double z);

      int ilogb(double x);
      int ilogbf(float x);
      int ilogbl(long double x);

      long long llrint(double x);
      long long llrintf(float x);
      long long llrintl(long double x);

      double log2(double x);
      float log2f(float x);
      long double log2l(long double x);

      double logb(double x);
      float logbf(float x);
      long double logbl(long double x);

      long lrint(double x);
      long lrintf(float x);
      long lrintl(long double x);

      double nan(const char *str);
      float nanf(const char *str);
      long double nanl(const char *str);

      double nearbyint(double x);
      float nearbyintf(float x);
      long double nearbyintl(long double x);

      double remainder(double x, double y);
      float remainderf(float x, float y);
      long double remainderl(long double x, long double y);

      double remquo(double x, double y, int *pquo);
      float remquof(float x, float y, int *pquo);
      long double remquol(long double x, long double y, int *pquo);

      double rint(double x);
      float rintf(float x);
      long double rintl(long double x);

      double scalbln(double x, long ex);
      float scalblnf(float x, long ex);
      long double scalblnl(long double x, long ex);
      double scalbn(double x, int ex);
      float scalbnf(float x, int ex);
      long double scalbnl(long double x, int ex);

      // C99 macros defined as C++ templates
      template<class T> bool isgreater(T x, T y);
      template<class T> bool isgreaterequal(T x, T y);
      template<class T> bool isless(T x, T y);
      template<class T> bool islessequal(T x, T y);
      template<class T> bool islessgreater(T x, T y);
      template<class T> bool isunordered(T x, T y);

[endsect]
[endsect]

[section:header_list TR1 By Header]

[section:array_header <array>]

See: [link boost_tr1.subject_list.array Fixed Size Array]

[endsect]

[section:cmath_header <cmath>]

See: [link boost_tr1.subject_list.special Special Functions]

See: [link boost_tr1.subject_list.c99_special C99 Special Functions]

[endsect]

[section:complex_header <complex>]

See: [link boost_tr1.subject_list.complex Additional Overloads for Complex Number Algorithms]

See: [link boost_tr1.subject_list.complex_trig Additional Complex Number Algorithms]

[endsect]

[section:functional <functional>]

See: [link boost_tr1.subject_list.ref Reference Wrapper].

See: [link boost_tr1.subject_list.result_of Result_of].

See: [link boost_tr1.subject_list.mem_fn Member Function Wrappers].

See: [link boost_tr1.subject_list.bind Function Binders].

See: [link boost_tr1.subject_list.function Polymorphic Function Wrappers].

See: [link boost_tr1.subject_list.hash Hash Functions].

[endsect]

[section:memory <memory>]

See: [link boost_tr1.subject_list.ptrs Smart Pointers].

[endsect]

[section:random_header <random>]

See: [link boost_tr1.subject_list.random Random Numbers].

[endsect]

[section:regex_header <regex>]

See: [link boost_tr1.subject_list.regex Regular Expressions].

[endsect]

[section:tuple_header <tuple>]

See: [link boost_tr1.subject_list.tuple Tuple Types].

[endsect]

[section:type_traits_header <type_traits>]

See: [link boost_tr1.subject_list.type_traits Type Traits].

[endsect]

[section:unordered_map_header <unordered_map>]

See: [link boost_tr1.subject_list.unordered_map Unordered Associative Map]

[endsect]

[section:unordered_set_header <unordered_set>]

See: [link boost_tr1.subject_list.unordered_set Unordered Associative Set].

[endsect]

[section:utility_header <utility>]

See: [link boost_tr1.subject_list.utility  Tuple Interface to std::pair].

[endsect]

[endsect]

[section:implementation Implementation]

When Boost.TR1 is [link boost_tr1.config configured] to make use of your standard library's
native TR1 implementation, then it doesn't do very much: it just includes
the appropriate header.

When Boost.TR1 is using the Boost implementation of a particular
component, then it includes the appropriate Boost header(s) and imports
the necessary declarations in `namespace std::tr1` with using declarations.
Note that only those declarations that are part of the standard are imported:
the implementation is deliberately quite strict about not including any 
Boost-specific extensions in `namespace std::tr1`, in order to catch any
portability errors in user code.  If you really need to use Boost-specific
extensions then you should include the Boost headers directly and use the
declarations in `namespace boost::` instead.  Note that this style of implementation
is not completely standards-conforming, in particular it is not possible
to add user-defined template specializations of TR1 components
into `namespace std::tr1`.  There are also one or two Boost libraries that are not
yet fully standards conforming, any such non-conformities are documented in 
[link boost_tr1.subject_list the TR1 by subject section].  Hopefully, occurrences of non-standard 
behavior should be extremely rare in practice however.

If you use the standard conforming header includes (in `boost/tr1/tr1`)
then these header names can sometimes conflict with existing standard library
headers (for example `shared_ptr` is added to the existing 
standard library header
`<memory>` rather than it's own header).  These headers 
forward on to your existing standard library header in one of two ways: for
gcc it uses `#include_next`, and for other compilers it uses the
macro `BOOST_TR1_STD_HEADER(header)` (defined in 
[@../../boost/tr1/detail/config.hpp boost/tr1/detail/config.hpp])
which evaluates to `#include <../include/header>`.  This
should work "straight out the box" for most compilers, but does mean that
these headers should [*never] be placed inside a 
directory called "include"
that is already in your compiler's search path.

[endsect]


[section:testing Testing]

The test suite for Boost.TR1 is relatively lightweight; tests have been
added to the Boost.Config test suite for each new configuration macro, and
each TR1 component has a very short concept check test added.  The concept test
programs are designed only to verify that all the TR1 components 
that are
supposed to be in `namespace std::tr1` are indeed present and have standards
conforming interfaces.  There are a few test programs (those which end in the suffix 
"_tricky") which do not currently compile with the Boost.TR1 implementation, because the
relevant Boost libraries have not yet implemented the features tested; hopefully
these incompatibilities will be removed in future releases.

The concept tests do not take account of compiler defects (quite deliberately
so); the intent is that the tests can be used to verify conformance with the
standard, both for Boost code, and for third party implementations.  Consequently
very many of these tests are known to fail with older compilers.  This should
not be taken as evidence that these compilers can not be used at all with Boost.TR1,
simply that there are features missing that make those compilers non-conforming.

Full runtime tests for TR1 components are not in general part of this
test suite, however, it is hoped that the Boost.TR1 component authors will make 
their regular test suites compile with the standards conforming headers as well
as the Boost-specific ones. This will allow these tests to be used against the standard 
library's own TR1 implementation as well as the Boost one.

[endsect]