std中内置容器的源文件? [英] Source files for buildt-in containers in std?

查看:81
本文介绍了std中内置容器的源文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了一张红黑树的stl_tree.h:

/usr/include/c++/4.1.2/bits


但是.cpp源文件位于何处或者是.h文件中的所有实现


I have found the stl_tree.h for a red-black tree in:
/usr/include/c++/4.1.2/bits

But where is the .cpp source file located or are all the implementation
located in the .h file?

推荐答案

desktop写道:
desktop wrote:

我找到了一个红黑树的stl_tree.h:

/usr/include/c++/4.1 .2 / bits


但是.cpp源文件在哪里找到或者是位于.h文件中的所有实现


I have found the stl_tree.h for a red-black tree in:
/usr/include/c++/4.1.2/bits

But where is the .cpp source file located or are all the implementation
located in the .h file?



我想所有的实现都在标题中,因为这是一个模板

库。但即使有一些实现,如果你从

源安装它,它只会在

源文件夹(例如,在/ usr / src中的某个地方)。


否则,很可能只有编译源(.a / .so)会在那里。


你的,

Daniel


-

得到两个亲爱的丹尼尔即时消息

由MSN,ICQ与压力联系 - -

所以请使用好的旧电子邮件!

I suppose all implementation is in the header, as this is a template
library. But even if there was some implementation, it would only be in
the source-folder (e.g., somewhere in /usr/src) if you installed it from
source.

Otherwise, most probably only the compiled sources (.a/.so) would be there.

Yours,
Daniel

--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!


6月8日上午11点10分,桌面< f ... @ss.comwrote:
On Jun 8, 11:10 am, desktop <f...@sss.comwrote:

我找到了一个红黑树的stl_tree.h:

/ usr / include / c ++ /4.1.2/bits
I have found the stl_tree.h for a red-black tree in:
/usr/include/c++/4.1.2/bits


但.cpp源文件位于何处或是所有

实现位于.h文件?
But where is the .cpp source file located or are all the
implementation located in the .h file?



谁知道?这取决于实施。你给出的路径

建议g ++,在这种情况下,在bits目录中的某个地方可能有一个文件.tcc

,具有实际的实现。

然而,有了一个很好的编译器,实现了导出,那就是

甚至不确定

机器上是否存在实现。当编译器没有实现导出时,每个实现都有自己的策略来处理这个问题。但是

关于任何相关的唯一时间就是当你自己调试图书馆的时候。


- -

James Kanze(GABI软件)电子邮件:ja ********* @ gmail.com

Conseils eninformatiqueorientéeobjet/

Beratung in objektorientierter Datenverarbeitung

9placeSémard,78210 St.-Cyr-l''coco,France,+ 33(0)1 30 23 00 34

Who knows? It''s up to the implementation. The path you give
suggests g++, in which case, there''s probably a file .tcc
somewhere in the bits directory, with the actual implementation.
With a good compiler, however, one that implements export, it''s
not even certain that the implementation is present on the
machine. And every implementation has its own strategy for
handling this when the compiler doesn''t implement export. But
about the only time any of this is relevant is when you''re
debugging the library yourself.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l''école, France, +33 (0)1 30 23 00 34


James Kanze写道:
James Kanze wrote:

6月8日上午11点10分,桌面< f ... @ sss。编写:
On Jun 8, 11:10 am, desktop <f...@sss.comwrote:

>我找到了一个红黑树的stl_tree.h:
/usr/include/c++/4.1.2/ bits
>I have found the stl_tree.h for a red-black tree in:
/usr/include/c++/4.1.2/bits


>但.cpp源文件位于.h文件中的所有
实现位置在哪里?
>But where is the .cpp source file located or are all the
implementation located in the .h file?



谁知道?这取决于实施。你给出的路径

建议g ++,在这种情况下,在bits目录中的某个地方可能有一个文件.tcc

,具有实际的实现。

然而,有了一个很好的编译器,实现了导出,那就是

甚至不确定

机器上是否存在实现。当编译器没有实现导出时,每个实现都有自己的策略来处理这个问题。但是

关于任何相关的唯一时间就是当你自己调试图书馆的时候。


- -

James Kanze(GABI软件)电子邮件:ja ********* @ gmail.com

Conseils eninformatiqueorientéeobjet/

Beratung in objektorientierter Datenverarbeitung

9placeSémard,78210 St.-Cyr-l''coco,France,+ 33(0)1 30 23 00 34


Who knows? It''s up to the implementation. The path you give
suggests g++, in which case, there''s probably a file .tcc
somewhere in the bits directory, with the actual implementation.
With a good compiler, however, one that implements export, it''s
not even certain that the implementation is present on the
machine. And every implementation has its own strategy for
handling this when the compiler doesn''t implement export. But
about the only time any of this is relevant is when you''re
debugging the library yourself.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l''école, France, +33 (0)1 30 23 00 34



在文件stl_tree.h中声明了旋转函数:

void

_Rb_tree_rotate_left(_Rb_tree_node_base * const __x,

_Rb_tree_node_base *& __root);


void

_Rb_tree_rotate_right(_Rb_tree_node_base * const __x,

_Rb_tree_node_base *& __root );


void

_Rb_tree_insert_and_rebalance(const bool __insert_left,

_Rb_tree_node_base * __x,

_Rb_tree_node_base * __p,

_Rb_tree_node_base& __header);


但它们没有定义。如果他们没有在我的机器上定义

他们定义了吗?我问的原因是因为我已经实现了一个红黑树的实施,并希望看到

专业版本。


我试图找到一个名为g ++的文件夹,但我只有一些二进制文件

以g ++开头。


In the file stl_tree.h the rotate functions are declared:
void
_Rb_tree_rotate_left(_Rb_tree_node_base* const __x,
_Rb_tree_node_base*& __root);

void
_Rb_tree_rotate_right(_Rb_tree_node_base* const __x,
_Rb_tree_node_base*& __root);

void
_Rb_tree_insert_and_rebalance(const bool __insert_left,
_Rb_tree_node_base* __x,
_Rb_tree_node_base* __p,
_Rb_tree_node_base& __header);

But they are not defined. If they are not defined on my machine where
are they defined? The reason I ask is because I have made my own
implementation of a red-black tree and would like to see the
"professional" version.

I have tried to find a folder called g++ but I only have some binaries
starting with g++.


这篇关于std中内置容器的源文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆