libstdc++

GNU standard library naming conventions

梦想的初衷 提交于 2020-12-30 17:31:10
问题 When I'm looking at the implementation of GNU libraries (well, libstdc++ mostly), I can see that there are recurring patterns in naming. Template types are named _Tp , members have prepending _M_ , some tokens have prepending double underscores, etc. I tried to find documentation on naming conventions to no avail. GNU has a styling guide, which is also followed in the code, but is more like a subset of this naming convention. Do you know any documentation on styling specifics of GNU gcc

GNU standard library naming conventions

不羁的心 提交于 2020-12-30 17:28:23
问题 When I'm looking at the implementation of GNU libraries (well, libstdc++ mostly), I can see that there are recurring patterns in naming. Template types are named _Tp , members have prepending _M_ , some tokens have prepending double underscores, etc. I tried to find documentation on naming conventions to no avail. GNU has a styling guide, which is also followed in the code, but is more like a subset of this naming convention. Do you know any documentation on styling specifics of GNU gcc

GNU standard library naming conventions

青春壹個敷衍的年華 提交于 2020-12-30 17:24:53
问题 When I'm looking at the implementation of GNU libraries (well, libstdc++ mostly), I can see that there are recurring patterns in naming. Template types are named _Tp , members have prepending _M_ , some tokens have prepending double underscores, etc. I tried to find documentation on naming conventions to no avail. GNU has a styling guide, which is also followed in the code, but is more like a subset of this naming convention. Do you know any documentation on styling specifics of GNU gcc

GNU standard library naming conventions

流过昼夜 提交于 2020-12-30 17:12:34
问题 When I'm looking at the implementation of GNU libraries (well, libstdc++ mostly), I can see that there are recurring patterns in naming. Template types are named _Tp , members have prepending _M_ , some tokens have prepending double underscores, etc. I tried to find documentation on naming conventions to no avail. GNU has a styling guide, which is also followed in the code, but is more like a subset of this naming convention. Do you know any documentation on styling specifics of GNU gcc

GNU standard library naming conventions

风格不统一 提交于 2020-12-30 17:10:57
问题 When I'm looking at the implementation of GNU libraries (well, libstdc++ mostly), I can see that there are recurring patterns in naming. Template types are named _Tp , members have prepending _M_ , some tokens have prepending double underscores, etc. I tried to find documentation on naming conventions to no avail. GNU has a styling guide, which is also followed in the code, but is more like a subset of this naming convention. Do you know any documentation on styling specifics of GNU gcc

terminate called after throwing an instance of 'std::system_error'

杀马特。学长 韩版系。学妹 提交于 2020-12-26 06:58:38
问题 When i use std::call_once in Linux version 2.6.36,it makes an error: terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Aborted Compile command: mipsel-buildroot-linux-uclibc-g++ callonce.cpp -o callonce -static -lpthread my code: #include <iostream> #include <mutex> using namespace std; int main() { cout << "Hello world" << std::endl; static once_flag of; call_once(of,[]{}); return 0; } 回答1: There is a major difference between linking statically and

terminate called after throwing an instance of 'std::system_error'

回眸只為那壹抹淺笑 提交于 2020-12-26 06:55:25
问题 When i use std::call_once in Linux version 2.6.36,it makes an error: terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Aborted Compile command: mipsel-buildroot-linux-uclibc-g++ callonce.cpp -o callonce -static -lpthread my code: #include <iostream> #include <mutex> using namespace std; int main() { cout << "Hello world" << std::endl; static once_flag of; call_once(of,[]{}); return 0; } 回答1: There is a major difference between linking statically and

Why debug files of libstdc++ are installed via glibc-debuginfo and gcc-debuginfo but not something called libstdc++-debuginfo?

若如初见. 提交于 2020-12-15 05:54:02
问题 When I was trying to figuring out this question What can I do differently after I install those missing debug info packages for gdb? asked by myself, I noticed that when I try to install the libstdc++ debug infos (test distro is CentOS 7.2 ): debuginfo-install libstdc++-4.8.5-44.el7.x86_64 What the system is going to install are: [root@VM-0-17-centos debug]# debuginfo-install libstdc++-4.8.5-44.el7.x86_64 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

Why debug files of libstdc++ are installed via glibc-debuginfo and gcc-debuginfo but not something called libstdc++-debuginfo?

廉价感情. 提交于 2020-12-15 05:47:20
问题 When I was trying to figuring out this question What can I do differently after I install those missing debug info packages for gdb? asked by myself, I noticed that when I try to install the libstdc++ debug infos (test distro is CentOS 7.2 ): debuginfo-install libstdc++-4.8.5-44.el7.x86_64 What the system is going to install are: [root@VM-0-17-centos debug]# debuginfo-install libstdc++-4.8.5-44.el7.x86_64 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

What is the purpose of having an empty pair base class?

独自空忆成欢 提交于 2020-11-30 02:51:27
问题 libstdc++'s implementation of pair has the following oddity template<typename, typename> class __pair_base { template<typename T, typename U> friend struct pair; __pair_base() = default; ~__pair_base() = default; __pair_base(const __pair_base&) = default; __pair_base& operator=(const __pair_base&) = delete; }; template<typename T, typename U> struct pair : private __pair_base<T, U> { /* never uses __pair_base */ }; __pair_base is never used, neither can it, considering it's empty. This is