Redian新闻
>
家的宝又有窗帘卖了
avatar
家的宝又有窗帘卖了# Living
c*e
1
1. Is the C++ template parameters decided at the compiling time or running
time?
2. How do you know the C++ template parameters are decided at the compiling
time or running time?
1 is simple. But how to answer 2? Thanks a ton.
avatar
i*e
3
2. You can run some simple tests. By increasing the number of different
types being called to a function of generic type, you should notice the
binary file being larger, due to extra code being generated by the compiler
(for each of the type used). Haven't verified this myself yet, so if I'm
wrong please feel free to correct.
avatar
n*e
4
link doesn't work here
could you update that? thanks
avatar
s*n
5
编译成汇编,每个method都有独立的signature
avatar
h*f
7
1. Compile time because template initialization is done during the compile
time and the initialization is based on the "known" template parameter(s)
during the compile time.
2. A way to prove:
#include
#include
template class Buffer {
char internal[max];
public:
void printSize() {
printf("buffer size=%lu\n", sizeof(internal));
}
};
int main() {
Buffer<512> my512;
my512.printSize();
size_t v;
std::cin >> v;
printf("my input=%lu\n", v);
/* Compilation error because tmeplate is generated in the compilation time,
and so a template cannot take a runtime value as the parameter
Buffer myInput;
myInput.printSize();
*/
return 0;
}
avatar
H*7
8
百叶吧,还是帘?
avatar
e*t
9
百业窗帘

【在 H******7 的大作中提到】
: 百叶吧,还是帘?
avatar
l*2
10
土人借问一下门怎么装百叶窗?也是买的这种窗户用的百叶窗吗?
avatar
b*n
11
If blinds are too wide and/or too long, can we cut them by ourself? Prepared
to buy and really your advices. Thanks, ~ BL

百业窗帘
★ Sent from iPhone App: iReader Mitbbs 6.88 - iPhone Lite

【在 e********t 的大作中提到】
: 百业窗帘
avatar
e*t
12
太宽去店里切,太长自己卸叶片。

Prepared

【在 b*****n 的大作中提到】
: If blinds are too wide and/or too long, can we cut them by ourself? Prepared
: to buy and really your advices. Thanks, ~ BL
:
: 百业窗帘
: ★ Sent from iPhone App: iReader Mitbbs 6.88 - iPhone Lite

avatar
b*n
13
Is it free of charge to have the store cut the blinds? Thanks again in
advance. ~BL

太宽去店里切,太长自己卸叶片。
★ Sent from iPhone App: iReader Mitbbs 6.88 - iPhone Lite

【在 e********t 的大作中提到】
: 太宽去店里切,太长自己卸叶片。
:
: Prepared

avatar
e*t
14
我觉得homedepot网上买的应该可以去店里切吧,反正是可以退到店里。

【在 b*****n 的大作中提到】
: Is it free of charge to have the store cut the blinds? Thanks again in
: advance. ~BL
:
: 太宽去店里切,太长自己卸叶片。
: ★ Sent from iPhone App: iReader Mitbbs 6.88 - iPhone Lite

avatar
T*e
15
得自己偷偷切,店员都搞不好的,要非常小心,能不切尽量不切

【在 b*****n 的大作中提到】
: Is it free of charge to have the store cut the blinds? Thanks again in
: advance. ~BL
:
: 太宽去店里切,太长自己卸叶片。
: ★ Sent from iPhone App: iReader Mitbbs 6.88 - iPhone Lite

avatar
T*e
16
有的店不给切,有的给你瞎切,他们都是切坏了换,你这个网上的型号店里根本没有,
坏了就傻了

【在 e********t 的大作中提到】
: 我觉得homedepot网上买的应该可以去店里切吧,反正是可以退到店里。
avatar
n*o
17
不是百叶窗吗,不是窗帘
avatar
e*t
18
哦,那就别买了。

【在 T*********e 的大作中提到】
: 有的店不给切,有的给你瞎切,他们都是切坏了换,你这个网上的型号店里根本没有,
: 坏了就傻了

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。