Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 892137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:00:16+00:00 2026-05-15T14:00:16+00:00

I want to browse the source code of gnu implementation of C++ standard libraries

  • 0

I want to browse the source code of gnu implementation of C++ standard libraries — header files as well as the implementation.
I have landed myself into:

http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/index.html

My first step was to look header file at:

http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a01376.html

My question is that as per my understanding the typedeffed string sth like:
typedef basic_string string;
should have been present in string header, but I don’t see one here.

Questions:
–in which file is the definition of string symbol?
–I see that string header file includes lot many headers and if the typedeffed sring symbol is defined in one of these internal headers, is there a search bar something on this site thru which I can reach to the definition of a symbol straightway. (in case someone has already browsed stuff from this site before)

Thanks,
Jagrati

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:00:16+00:00Added an answer on May 15, 2026 at 2:00 pm

    A lot of libstdc++ is implemented using only headers, but some parts of the STL, like std::basic_string, have compiled implementations.

    The declaration of template std::basic_string is located in /usr/include/c++/4.4.4/bits/basic_string.h (replace ‘4.4.4’ with g++ -dumpversion) and the implementation is in /usr/include/c++/4.4.4/bits/basic_string.tcc. The actual typedef of std::string, std::wstring, etc. is in .../bits/stringfwd.h. If you needed to instantiate std::basic_string with other template parameters, for example, then you do something like:

    #include <bits/basic_string.tcc>
    
    template class std::basic_string<long>;
    

    The way that libstdc++ implements sets and maps (header-only) is kind of interesting, but also very complex because it uses a custom red-black tree implementation (_Rb_tree).

    The libstdc++ implementation of std::vector (also header-only) is more self-contained, so it’s worth a glance in /usr/include/c++/4.4.4/bits/stl_vector.h to give you an idea of the internals of libstdc++. Another interesting file is .../bits/stl_algo.h, which contains the definitions of STL algorithms.

    Note: On Windows with MinGW, you’ll find the libstdc++ headers in lib\gcc\mingw32\4.4.0\include\c++\bits of your MinGW installation, replacing ‘4.4.0’ with g++ -dumpversion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say you have an app, that you want to provide users ability to browse
Is it possible to browse the source code of OpenJDK online, just like I
Sorry for maybe this is stupid question, I just want download source code form
I have url like: http://www.matweb.com/search/DataSheet.aspx?MatGUID=849e2916ab1541be9ff6a17b78f95c82 I want to download source code from that page
i have a site where people can download source code, sorta paste type site,
I want to change the Text of the browse button in the FileUpload Control
Concerning pages that build a web application: Lately, I have found myself creating web
I have a compiled flash animation (swf) embeded into a HTML document using the
I want to get the header of a selected tab-item of a tab-control and
I want to have generalised email templates. Currently I have multiple email templates with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.