避免目标文件 [英] avoiding object files
问题描述
你好,
我写了一个小库,里面有模板函数和
类(99%)和两个非模板类。我非常感谢,如果我通过仅包含一些头文件来使用库,而不必使用
来处理构建和链接库或目标文件。是否有任何
技巧如何实现?
我猜不是,但也许你知道的更好。
祝你好运,
alex
Hello,
I have written a little library which consists of template functions and
classes (99%) and two non-template classes. I''d appreciate very much if I
could use the library by only including some header files without having to
deal with building and linking a library or object files. Are there any
tricks how this can be achieved?
I guess not, but perhaps you know better.
Best regards,
alex
推荐答案
Alexander Stippler在新闻中写道:41 ****** @ news.uni-ulm .de in
comp.lang.c ++:
Alexander Stippler wrote in news:41******@news.uni-ulm.de in
comp.lang.c++:
你好,
我写了一个由模板函数组成的小库
和类(99%)和两个非模板类。如果我只使用一些头文件来使用库,而不必处理构建和链接库或对象文件,我会非常感激。有什么技巧可以实现吗?
我想不是,但也许你知道的更好。
Hello,
I have written a little library which consists of template functions
and classes (99%) and two non-template classes. I''d appreciate very
much if I could use the library by only including some header files
without having to deal with building and linking a library or object
files. Are there any tricks how this can be achieved?
I guess not, but perhaps you know better.
而不是
class non_template
{
//无论
};
:
模板< typename = void>
class for_non_template
{
//无论如何(如上)。
};
typedef for_non_template<> non_template;
HTH。
Rob。
-
http://www.victim-prime.dsl.pipex.com/
Rob Williscroft写道:
Rob Williscroft wrote:
Alexander Stippler在新闻中写道:41 *** ***@news.uni-ulm.de在
comp.lang.c ++:
Alexander Stippler wrote in news:41******@news.uni-ulm.de in
comp.lang.c++:
你好,
我写了一个小图书馆它由模板函数和类(99%)和两个非模板类组成。如果我只使用一些头文件来使用库,而不必处理构建和链接库或对象文件,我会非常感激。有什么技巧可以实现吗?
我想不是,但也许你知道的更好。
Hello,
I have written a little library which consists of template functions
and classes (99%) and two non-template classes. I''d appreciate very
much if I could use the library by only including some header files
without having to deal with building and linking a library or object
files. Are there any tricks how this can be achieved?
I guess not, but perhaps you know better.
而不是
类non_template
{
//无论
};
做:
模板< typename = void>
class for_non_template
{无论如何(如上所述)。
};
typedef for_non_template<> non_template;
Instead of
class non_template
{
// whatever
};
Do:
template < typename = void >
class for_non_template
{
// Whatever (as above).
};
typedef for_non_template<> non_template;
如果在模板参数中使用typename关键字是什么意思
声明?
谢谢,
David
what does it mean if you use the typename keyword in a template parameter
declaration?
Thanks,
David
David Lindauer在新闻中写道:41 ********* ******@bluegrass.net在
comp.lang.c ++:
David Lindauer wrote in news:41***************@bluegrass.net in
comp.lang.c++:
如果你使用typename是什么意思模板参数中的关键字
声明?
what does it mean if you use the typename keyword in a template parameter
declaration?
它与你上课时完全一样。
Rob 。
-
http: //www.victim-prime.dsl.pipex.com/
这篇关于避免目标文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!