libstdc++ Questions

1

Solved

Taken from the GCC implementation of type_traits why is static_cast needed here? template <typename _Tp, typename... _Args> struct __is_nt_constructible_impl : public integral_constant<b...
Perrie asked 7/1, 2020 at 11:28

3

Solved

Consider the following snippet: #include <array> int main() { using huge_type = std::array<char, 20*1024*1024>; huge_type t; } Obviously it would crash on most of platforms, becaus...
Scapegrace asked 6/1, 2020 at 20:28

1

Solved

I've come across this behavior of std::gcd that I found unexpected: #include <iostream> #include <numeric> int main() { int a = -120; unsigned b = 10; //both a and b are represent...
Gosh asked 17/12, 2019 at 17:57

1

Solved

Consider this minimal example: #include <filesystem> #include <iostream> int main() { std::cout << std::filesystem::current_path() << '\n'; } It works as expected in GC...
Kreda asked 16/9, 2019 at 19:43

2

Solved

I am experiencing a very strange behavior, which I distilled down to a very basic test: #include <string> #include <filesystem> int main(void) { const std::string name = "foo"; cons...
Wendeline asked 24/6, 2019 at 14:27

7

Solved

My client had some developer write a small c++ command-line app to run on their Linux servers. On one of the servers (running Fedora 11), when I execute the app I get the following error: error wh...
Unbound asked 16/9, 2010 at 22:37

2

Assume I have the following local gcc, g++ version: $ gcc -v $ g++ -v gcc version 6.3.1 I don't understanding the relation and meaning of the following compared to my compiler version: What is ...
Jinx asked 26/6, 2019 at 22:4

5

Solved

I need to deploy a C++ application built on Ubuntu 12.10 with GCC 4.7's libstdc++ to systems running Ubuntu 10.04, which comes with a considerably older version of libstdc++. Currently, I'm compili...
Heads asked 29/11, 2012 at 23:12

1

Solved

Based on the discussion here, I have reported a bug to the Ubuntu developers. When compiling the following sample c++ program: #include <cmath> #include <stdio.h> int main() ...
Unlisted asked 2/6, 2019 at 18:49

2

Solved

Looking at C++ compiler support, it appears that the untimed version of std::shared_mutex is available in GCC 5.0+. However, even with gcc version 5.3.0 20151204 (Ubuntu 5.3.0-3ubuntu1~14.04), and ...
Mulry asked 25/3, 2016 at 15:31

2

my custom built gcc 4.6.0, installed in my home directory, on ubuntu 10.04, links the system libstdc++ instead of the custom built one, most of the time (as evidenced by ldd). to be more puzzling, ...
Anett asked 19/4, 2011 at 15:21

3

Solved

The code is fairly simple: #include <vector> int main() { std::vector<int> v; } Then I build and run it with Valgrind on Linux: g++ test.cc && valgrind ./a.out ==8511== Mem...
Teillo asked 7/8, 2017 at 0:37

0

I'm trying to upgrade an application to C++17 and am getting the following compiler error: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type I'm using gcc (GCC) 8.2.0 and compiling with the fo...
Ontologism asked 21/3, 2019 at 13:43

3

Solved

I am trying to install Qt in my CentOS system. While building the library, I'm getting this error: /root/capture/qt-everywhere-opensource-src-4.7.0/bin/qmake: error while loading shared libraries:...
Corcyra asked 19/10, 2010 at 11:3

2

Solved

When I use GCC, I can build program on my Ubuntu 15.04 using this: -static-libgcc -static-libstdc++ And compiled binary can run on "stock" Ubuntu 14.04 without any external packages, only standa...
Hellgrammite asked 22/12, 2015 at 9:4

3

Solved

Recently I have taken a look at the implementation of std::not_fn function template provided by gcc. The return type of this function template is _Not_fn - a wrapper class template which negates a...
Doreathadoreen asked 8/5, 2018 at 19:11

5

I'm trying something spooky here. I'm trying to write C++ programs, compiled with GNU's g++, but without a dependency on libstdc++ :) but it seems that I need that for even the most basic things ne...
Danika asked 15/9, 2010 at 1:57

3

Solved

The macro __GLIBCXX__ contains the time stamp of libstdc++ releases, e.g., from gcc documentation (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html) __GLIBCXX__ The current ver...
Buddleia asked 9/5, 2016 at 14:16

2

Solved

Both libstdc++ and libc++ makes moved-from std::string object empty, even if the original stored string is short and short string optimization is applied. It seems to me that this emptying makes an...
Lazurite asked 8/10, 2018 at 6:18

1

I'm trying to build a binary with GCC 4.9.0 that is backwards-compatible against libstdc++. According to GCC's ABI Policy and Guidelines and Options Controlling C++ Dialect, the command line option...
Forefoot asked 27/6, 2014 at 14:58

1

Solved

I'm using gcc-4.9 which does not have the is_trivially_constructible type trait. Looking into the libstdc++ source code (type_traits), this depends on __is_trivially_constructible which is implemen...
Erivan asked 18/4, 2018 at 13:42

1

Solved

Consider the situation when a C++ project is built and shipped within a Centos 7 virtual machine or container. Default gcc for Centos 7 is 4.8. In order to allow developers to use modern C++, the m...
Weltpolitik asked 2/10, 2018 at 13:22

2

Solved

I am working on some research and would like to edit some of the source code in the libstdc++ library for experimentation. I am, specifically, interested in experimenting with the parallel sorting ...
Fascista asked 19/2, 2014 at 5:54

1

Solved

I am scratching my head on std::optional which, according to the docs, shouldn't have a constexpr assignment operator. However, when I try this snippet in gcc-8.1, it compiles and works just fine:...
Chlorous asked 19/8, 2018 at 19:9

1

Solved

Today I have found an interesting case of the dual libstdc++ ABI affecting compatibility of libraries. Long story short, I have two libraries that both use std::regex internally. One is built with...
Cardwell asked 17/7, 2018 at 13:14

© 2022 - 2024 — McMap. All rights reserved.