Re: Question on explicit template expansion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Garrett Kajmowicz wrote:
I'm working on the embedded C++ library at cxx.uclibc.org

As a part of my work, I've been pushing some of the common template expansions out into the binary library to reduce overall expansion. This works well *except* for constructors and destructors. I would like an explanation as to why the following occurs and what I can go to deal with it.


Given (say) class string, I have:

//In the header file

template<class Ch, class Tr, class A> class basic_string {
public:
	explicit basic_string(const A& al = A()) { return; }
	~basic_string() { }

//	<snip>
//	<snip>
//	<snip>

};

#ifndef __UCLIBCXX_COMPILE_STRING__
	template <> string::basic_string(const allocator<char> &);
	template <> string::~basic_string();
#endif

This doesn't compile. Do you have a test case that does compile?

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux