什么是可转债| 撇嘴是什么意思| 感冒吃什么菜| 荨麻疹忌口忌什么食物| pls是什么意思| qid是什么意思| 莎字五行属什么| 做梦被打了是什么意思| 口腔黏膜挂什么科| 挂了是什么意思| 胸围110是什么罩杯| 护理专业是什么| 梦见朋友怀孕了是什么意思| 胃酸过多吃什么药| 抑郁症是什么病| 放生是什么意思| 为什么哭了眼睛会肿| 新生儿黄疸吃什么药| 健康证什么时候可以办| 濑粉是什么| 乙肝三项检查什么| 睡觉老是做梦是什么原因| 点了斑不能吃什么| 离殇是什么意思| 脾胃虚吃什么水果好| 偶数和奇数是什么意思| 空降兵属于什么兵种| 胃火旺喝什么茶| 梦到捉鱼是什么意思| 螺蛳粉为什么臭| 血色素低吃什么补得快| 阅读是什么意思| 黄体破裂什么意思| 什么血型招蚊子叮咬| 扑炎痛又叫什么| 血小板过低有什么危害| 什么是平行世界| 水烟是什么| 磁共振是做什么的| 乙状结肠炎吃什么药| 降真香是什么| 鬼斧神工是什么意思| 陶土色大便是什么颜色| 什么是甲醛| 半青皮是什么意思| 什么是自锁| 厌恶是什么意思| 免疫力低吃什么药| 用什么方法可以戒酒| 婴儿湿疹用什么药膏最有效| 传说中的狮身人面像叫什么名字| 什么减肥药效果最好而且不反弹| 吃什么容易得胆结石| 心衰为什么会引起水肿| 什么花不能浇硫酸亚铁| 两个人可以玩什么游戏| 正觉是什么意思| 黄体酮低吃什么补得快| 什么狗聪明听话又好养| 时值是什么意思| 蓝色妖姬适合送什么人| 慧外秀中什么意思| 怜香惜玉是什么意思| chd医学上是什么意思| 秦始皇长什么样| 五大发展理念是什么| 肾结石是什么原因引起的| 胎动什么时候出现| 风热感冒是什么意思| 杏仁有什么功效| 小白加小白等于什么| 6月4号是什么星座| 小孩流鼻血吃什么好| 过敏输液输什么药好| 96年属什么命| 三十年婚姻是什么婚| 猪筒骨配什么炖汤好| 焦虑吃什么药好| 贝字旁的字和什么有关| 柳絮是什么| 检查胰腺挂什么科| 百合长什么样子| 罗汉果有什么作用| 上证指数是什么意思| 刺激什么意思| 多种维生素什么时候吃效果最好| 两边白头发多是什么原因造成的| 白羊座是什么星座| 千什么百什么| 上技校学什么专业好| 阉鸡是什么鸡| 双鱼座女和什么星座最配| 佛灯火命是什么意思| 画什么点睛| 沙茶酱什么味道| 食人鱼长什么样子| 什么如什么| 胎毛什么时候剃最好| 子宫肌瘤是什么原因造成的| 常吃南瓜有什么好处和坏处| 天气一热身上就痒是什么原因| 冠状沟是什么位置| 隐翅虫皮炎用什么药膏| 健康管理是什么| 甜瓜不能和什么一起吃| 女人吃芡实有什么好处| 牛的尾巴有什么作用| 霉菌性阴道炎用什么洗液好| 清胃火吃什么药| 口腔溃疡吃什么药| ahc是韩国什么档次| hp代表什么意思| 鹿的角像什么| gl小说是什么意思| 福生无量是什么意思| 它是什么用英语怎么说| 小孩有积食吃什么调理| 为什么会肠鸣| 方便是什么意思| lime是什么水果| 大米粉做什么好吃| 专柜是什么意思| 牛排和什么一起炖好吃| 智障是什么意思| 外公是什么关系| 解语花是什么意思| 肾上腺彩超是检查什么| 什么钙片最好| 体脂是什么意思| 胃反流吃什么药| 杀青了是什么意思| 1979年是什么命| 嗓子痒控制不住咳嗽是什么原因| 10.25是什么星座| 梅花鹿吃什么食物| 类风湿要吃什么药| 农历八月初五是什么星座| cc是什么单位| 牙龈发炎吃什么消炎药| 鹅拉绿色粪便是什么病| ect是什么| 什么是胃炎| 什么的花纹| 霸屏是什么意思| 1997年属什么生肖年| 阿胶的原料是什么| 感冒咳嗽吃什么药止咳效果好| 马来西亚有什么特产| 野茶属于什么茶| 黄油可以用什么代替| 睡觉容易惊醒是什么原因| 吴亦凡什么星座| tm什么意思| 夏天喝什么解渴| 水浒传为什么叫水浒传| 婴幼儿积食会有什么症状| 精索静脉曲张是什么原因导致的| 孕妇喝什么牛奶| 什么快递便宜| 白灼虾是什么虾| 喝什么降尿酸| 男人左眼跳是什么预兆| 雷什么风什么| 帕金森挂什么科| 哀伤是什么意思| eva是什么材料| be结局是什么意思| 犬瘟吃什么药管用| 什么人不能喝绿豆汤| 土化是什么字| 崇洋媚外是什么意思| 什么情况下需要割包皮| 玫瑰糠疹是什么病| 孕检无创是检查什么的| 上海元宵节吃什么| 天山翠属于什么玉| 来月经可以吃什么水果| 龟吃什么食物| 嘴角有痣代表什么| 白带变多是什么原因| 什么叫尿毒症| 首肯是什么意思| 解痉镇痛酊有什么功效| 黄芪的功效是什么| 为什么阴道会排气| 流口水是什么原因| 三氧化硫常温下是什么状态| 胸口闷闷的有点疼是什么原因| 鱼子酱是什么鱼的鱼子| ra医学上是什么意思| 四大是什么| 舌尖有裂纹是什么原因| 为什么打嗝| 中国梦是什么梦| 过期的酸奶有什么用| 寒衣节是什么意思| 支气管炎吃什么药最有效| 疝气吃什么药效果好| 车迟国的三个妖怪分别是什么| 阳暑吃什么药| 1995属什么生肖| 肺脓肿是什么病严重吗| 皮下囊肿挂什么科| 月经量少发黑是什么原因| 下巴发黑是什么原因| 00年属什么生肖| 5月21日什么星座| 眩晕是什么原因引起的| 无聊的反义词是什么| 什么情况打破伤风| 师兄是什么意思| 轻度脑萎缩是什么意思| 肺部高密度影是什么意思| 纪委是什么| 兼职是什么| 什么食物吃了不胖| 吃什么可以降低血糖| 满月脸水牛背是什么病| 隽读什么| 与众不同是什么意思| 什么叫补充公积金| pp是什么材质| 大便特别臭是什么原因| 什么是特应性皮炎| 指甲很薄很软是为什么| 开塞露是什么成分| 蜱虫咬人后有什么症状| 松鼠喜欢吃什么食物| 榅桲是什么水果| 女性尿道出血是什么原因引起的| 起酥油是什么| 胸口有痣代表什么意思| 词牌名是什么意思| 什么的葡萄| 桑蚕丝被有什么好处| 淋巴发炎是什么症状| 石光荣是什么军衔| lg是什么| 离卦代表什么| 什么是机制| 小孩c反应蛋白高说明什么| 怀孕不能吃什么药| 风对什么| 有脚气用什么药| 30岁属什么| 低血钾吃什么补上来的快| 偶尔头疼是什么原因| 男人眉骨高代表什么| 对牛弹琴是什么意思| 返流性食管炎用什么药| 头皮脂溢性皮炎用什么药| 橘白猫是什么品种| 鸡肉配什么菜好吃| 七月十二是什么星座| aps是什么意思| 明天属什么生肖| 下眼睑浮肿是什么原因| 静修是什么意思| 吃奇亚籽有什么好处| 城头土命是什么意思| 90年属马的是什么命| 敏感水体是什么意思| 细菌性阴道炎用什么洗液| 中医说的湿气重是什么意思| 百度

中央美术学院百年校庆推出徐悲鸿艺术大展

百度 换言之,在我国宪法和法律规定的制度体系中,协商民主绝不是对选举民主的“超越”和“替代”,而是对选举民主的补充、丰富和完善。

C++ Technical Report 1 (TR1) is the common name for ISO/IEC TR 19768, C++ Library Extensions, which is a document that proposed additions to the C++ standard library for the C++03 language standard. The additions include regular expressions, smart pointers, hash tables, and random number generators. TR1 was not a standard itself, but rather a draft document. However, most of its proposals became part of the later official standard, C++11. Before C++11 was standardized, vendors used this document as a guide to create extensions. The report's goal was "to build more widespread existing practice for an expanded C++ standard library".

The report was first circulated in draft form in 2005 as Draft Technical Report on C++ Library Extensions, then published in 2007 as an ISO/IEC standard as ISO/IEC TR 19768:2007.

Overview

edit

Compilers did not need to include the TR1 components in order to conform to the C++ standard, because TR1 proposals were not part of the standard itself, only a set of possible additions that were still to be ratified. However, most of TR1 was available from Boost, and several compiler/library distributors implemented all or some of the components. TR1 is not the complete list of additions to the library that appeared in C++11. For example, C++11 includes a thread support library that is not available in TR1.

The new components were defined in the std::tr1 namespace to distinguish them from the then-current standard library.

Components

edit

TR1 includes the following components:

General utilities

edit

Reference wrapper – enables passing references, rather than copies, into algorithms or function objects. The feature was based on Boost.Ref.[1] A wrapper reference is obtained from an instance of the template class reference_wrapper. Wrapper references are similar to normal references (‘&’) of the C++ language. To obtain a wrapper reference from any object the template class ref is used (for a constant reference cref is used).

Wrapper references are useful above all for template functions, when argument deduction would not deduce a reference (e.g. when forwarding arguments):

#include <iostream>
#include <tr1/functional>

void f( int &r )  { ++r; }

template< class Funct, class Arg >
void g( Funct f, Arg t )
{
  f(t);
}

int main()
{
  int i = 0;

  g( f, i );                   // 'g< void(int &r), int >' is instantiated
  std::cout << i << "\n";      // Output: 0

  g( f, std::tr1::ref(i) );    // 'g< void(int &r), reference_wrapper<int> >' is instanced
  std::cout << i << "\n";      // Output: 1
}

Smart pointers – adds several classes that simplify object lifetime management in complex cases. Three main classes are added:

  • shared_ptr – a reference-counted smart pointer
  • weak_ptr – a variant of shared_ptr that doesn't increase the reference count

The proposal is based on Boost Smart Pointer library.[2]

Function objects

edit

These four modules are added to the <functional> header file:

Polymorphic function wrapper (function) – can store any callable function (function pointers, member function pointers, and function objects) that uses a specified function call signature. The type does not depend on the kind of the callable used. Based on Boost.Function[3]

Function object binders (bind) – can bind any parameter parameters to function objects. Function composition is also allowed. This is a generalized version of the standard std::bind1st and std::bind2nd bind functions. The feature is based on Boost Bind library.[4]

Function return types (result_of) – determines the type of a call expression.

Member functions (mem_fn) – enhancement to the standard std::mem_fun and std::mem_fun_ref. Allows pointers to member functions to be treated as function objects. Based on Boost Mem Fn library.[5]

Metaprogramming and type traits

edit

There is now <type_traits> header file that contains many useful trait meta-templates, such as is_pod, has_virtual_destructor, remove_extent, etc. It facilitates metaprogramming by enabling queries on and transformation between different types. The proposal is based on Boost Type Traits library.[6]

Numerical facilities

edit

Random number generation

edit

Mathematical special functions

edit

Some features of TR1, such as the mathematical special functions and certain C99 additions, are not included in the Visual C++ implementation of TR1. The Mathematical special functions library was not standardized in C++11.

  • additions to the <cmath>/<math.h> header files – beta, legendre, etc.

These functions will likely be of principal interest to programmers in the engineering and scientific disciplines.

The following table shows all 23 special functions described in TR1.

Function name Function prototype Mathematical expression
Associated Laguerre polynomials double assoc_laguerre( unsigned n, unsigned m, double x )?; ?
Associated Legendre polynomials double assoc_legendre( unsigned l, unsigned m, double x )?; ?
Beta function double beta( double x, double y )?; ?
Complete elliptic integral of the first kind double comp_ellint_1( double k )?; ?
Complete elliptic integral of the second kind double comp_ellint_2( double k )?; ?
Complete elliptic integral of the third kind double comp_ellint_3( double k, double nu )?; ?
Confluent hypergeometric functions double conf_hyperg( double a, double c, double x )?; ?
Regular modified cylindrical Bessel functions double cyl_bessel_i( double nu, double x )?; ?
Cylindrical Bessel functions of the first kind double cyl_bessel_j( double nu, double x )?; ?
Irregular modified cylindrical Bessel functions double cyl_bessel_k( double nu, double x )?; ?
Cylindrical Neumann functions

Cylindrical Bessel functions of the second kind

double cyl_neumann( double nu, double x )?; ?
Incomplete elliptic integral of the first kind double ellint_1( double k, double phi )?; ?
Incomplete elliptic integral of the second kind double ellint_2( double k, double phi )?; ?
Incomplete elliptic integral of the third kind double ellint_3( double k, double nu, double phi )?; ?
Exponential integral double expint( double x )?; ?
Hermite polynomials double hermite( unsigned n, double x )?; ?
Hypergeometric series double hyperg( double a, double b, double c, double x )?; ?
Laguerre polynomials double laguerre( unsigned n, double x )?; ?
Legendre polynomials double legendre( unsigned l, double x )?; ?
Riemann zeta function double riemann_zeta( double x )?; ?
Spherical Bessel functions of the first kind double sph_bessel( unsigned n, double x )?; ?
Spherical associated Legendre functions double sph_legendre( unsigned l, unsigned m, double theta )?; ?
Spherical Neumann functions

Spherical Bessel functions of the second kind

double sph_neumann( unsigned n, double x )?; ?

Each function has two additional variants. Appending the suffix ‘f’ or ‘l’ to a function name gives a function that operates on float or long double values respectively. For example:

float sph_neumannf( unsigned n, float x ) ;
long double sph_neumannl( unsigned n, long double x ) ;

Containers

edit

Tuple types

edit
  • new <tuple> header file – tuple
  • based on Boost Tuple library[7]
  • vaguely an extension of the standard std::pair
  • fixed size collection of elements, which may be of different types

Fixed size array

edit
  • new <array> header file – array
  • taken from Boost Array library[8]
  • as opposed to dynamic array types such as the standard std::vector

Hash tables

edit
  • new <unordered_set>, <unordered_map> header files
  • they implement the unordered_set, unordered_multiset, unordered_map, and unordered_multimap classes, analogous to set, multiset, map, and multimap, respectively
    • unfortunately, unordered_set and unordered_multiset cannot be used with the set_union, set_intersection, set_difference, set_symmetric_difference, and includes standard library functions, which work for set and multiset
  • new implementation, not derived from an existing library, not fully API compatible with existing libraries
  • like all hash tables, often provide constant time lookup of elements but the worst case can be linear in the size of the container

Regular expressions

edit
  • new <regex> header file – regex, regex_match, regex_search, regex_replace, etc.
  • based on Boost RegEx library[9]
  • pattern matching library

C compatibility

edit

C++ is designed to be compatible with the C programming language, but is not a strict superset of C due to diverging standards. TR1 attempts to reconcile some of these differences through additions to various headers in the C++ library, such as <complex>, <locale>, <cmath>, etc. These changes help to bring C++ more in line with the C99 version of the C standard (not all parts of C99 are included in TR1).

Technical Report 2

edit

In 2005, a request for proposals for a TR2 was made with a special interest in Unicode, XML/HTML, Networking and usability for novice programmers.TR2 call for proposals.

Some of the proposals included:

After the call was issued for proposals for TR2, ISO procedures were changed, so there will not be a TR2. Instead, enhancements to C++ will be published in a number of Technical Specifications. Some of the proposals listed above are already included in the C++ standard or in draft versions of the Technical Specifications.

See also

edit
  • C++11, standard for the C++ programming language; the library improvements were based on TR1
  • C11 (C standard revision), a revision of the C standard which incorporated some features proposed in TR1
  • Boost library, a large collection of portable C++ libraries, several of which were included in TR1
  • Standard Template Library, part of the current C++ Standard Library

References

edit
  1. ^ "ref - 1.72.0". www.boost.org.
  2. ^ "Boost.SmartPtr: The Smart Pointer Library - 1.72.0". www.boost.org.
  3. ^ "Chapter 16. Boost.Function - 1.72.0". www.boost.org.
  4. ^ "Chapter 1. Boost.Bind - 1.72.0". www.boost.org.
  5. ^ "Chapter 1. Boost.Member Function - 1.72.0". www.boost.org.
  6. ^ "Chapter 1. Boost.TypeTraits - 1.37.0". www.boost.org.
  7. ^ "The Boost Tuple Library – Boost 1.48.0". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
  8. ^ "Chapter 5. Boost.Array - 1.72.0". www.boost.org.
  9. ^ "Boost.Regex - 1.36.0". www.boost.org.

Sources

edit
edit
姜还是老的辣是什么意思 12月20是什么星座 人为什么需要诗歌 used是什么意思 例假血是黑色的是什么原因
肚脐眼左右两边疼是什么原因 m表示什么 应激是什么意思 移动电源和充电宝有什么区别 男性前列腺炎吃什么药
qa和qc有什么区别 李连杰得了什么病 斯德哥尔摩综合症是什么意思 什么叫鳞状细胞 中的五行属性是什么
吃什么化痰 原籍是什么意思 土字旁的字与什么有关 切除甲状腺有什么影响 排毒吃什么最好能排脸上毒
2月2号什么星座xscnpatent.com 吃完紧急避孕药不能吃什么hcv8jop5ns3r.cn 群什么吐什么hcv8jop6ns6r.cn 西游记告诉我们什么道理0735v.com 白羊座的幸运色是什么颜色xinmaowt.com
放屁多是什么原因呢hkuteam.com 血管堵塞有什么症状hcv9jop6ns7r.cn 麦粒肿吃什么药hcv8jop0ns1r.cn 梦见建房子是什么预兆hcv9jop0ns1r.cn 大姨妈期间可以吃什么水果xinmaowt.com
颈椎病吃什么药效果好hcv8jop9ns4r.cn 耳朵背后有痣代表什么hcv9jop0ns0r.cn 什么一刻值千金花有清香月有阴hcv8jop1ns9r.cn 吐痰带血是什么原因hcv9jop3ns9r.cn 花名是什么意思gysmod.com
直肠增生性的息肉是什么意思hcv7jop9ns5r.cn 虎口是什么穴位naasee.com 怀不上孕是什么原因造成的hcv8jop8ns2r.cn 睁一只眼闭一只眼是什么意思hcv9jop1ns7r.cn 肝胃不和吃什么药hcv9jop0ns8r.cn
百度