08-09-2009
The first several lines about the "export" keyword should be pretty clear: "export", used to enable a separation of declaration and definition of template classes/functions, is not supported by GCC.
A common work around to avoid this deprecated keyword and still stay on top of things is to do sort of a reverse include: Provide prototypes (with normal header extension) and definitions (usually with an "impl" ext.) in distinct files as usual but include the implementation file at the end of the header file. This is necessary as template instantiation requires presence of definition so it can instantiate the template "in one go".
Another error I spotted at a quick glance is linked with the very last function. Am I right in assuming it should be a total specialization of the function above? Then it should read "template <>". Of course, also here the function's definition is missing.
Hth, Gunther
6 More Discussions You Might Find Interesting
1. Programming
Hi, i have class template,
1)can i override the copy constructor
2)can we have virtual function in class template
if not plz tel why? I tried , compile error comes for me...
Thanks
Sarwan (0 Replies)
Discussion started by: sarwan
0 Replies
2. UNIX for Dummies Questions & Answers
Hello.
I want to copy temp files when I make a new file by vi.
For example,
09:32:52 ~/ $ mkdir test
09:33:03 ~/ $ cd test/
09:33:09 ~/test/ $ ls
09:33:16 ~/test/ $ vi test.cpp
09:34:37 ~/test/ $ cat test.cpp
#include <iostream>
int main()
{
}
09:34:48 ~/test/ $ vi test.bash
09:35:19... (1 Reply)
Discussion started by: Euler04
1 Replies
3. Programming
Hi all,
Need your help. I am doing a simple template program , getting some error ... here is the code
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include<iostream>
#include<string>
#include <sstream>
using namespace std;
class Base_class
{
public:
Base_class(){... (1 Reply)
Discussion started by: amartya_sock
1 Replies
4. Shell Programming and Scripting
hi experts,
i'm trying to do this:
file1 is a template. might have kinds of 'funny' characters.
sample:
<body>
<form>
<p><input type="text" name="abc"/></p>
<p><my_content></p>
</form>
</body>
file2 is a file that contains lots of text. this might be very big. might have... (2 Replies)
Discussion started by: xjohnu
2 Replies
5. Programming
I get some compiling errors about template instantiation :wall: , but I can't find where the syntax errors happens. Can some help me?
template<typename Type> class SingleList;
template<typename Type> class SingleListNode{
private:
friend class SingleList<Type>;
SingleListNode() :... (1 Reply)
Discussion started by: 915086731
1 Replies
6. Programming
Hello Again,
I am just wanted to know if we can call the Template using "require_once" at PHP?
Any views around happy to discuss.
Thanks in Advance (2 Replies)
Discussion started by: AimyThomas
2 Replies
LEARN ABOUT SUNOS
config.guess
CONFIG.GUESS(1) User Commands CONFIG.GUESS(1)
NAME
config.guess - guess the build system triplet
SYNOPSIS
config.guess [OPTION]
DESCRIPTION
The GNU build system distinguishes three types of machines, the `build' machine on which the compilers are run, the `host' machine on which
the package being built will run, and, exclusively when you build a compiler, assembler etc., the `target' machine, for which the compiler
being built will produce code.
This script will guess the type of the `build' machine.
Output the configuration name of the system `config.guess' is run on.
Operation modes:
-h, --help
print this help, then exit
-t, --time-stamp
print date of last modification, then exit
-v, --version
print version number, then exit
ENVIRONMENT VARIABLES
config.guess might need to compile and run C code, hence it needs a compiler for the `build' machine: use the environment variable
`CC_FOR_BUILD' to specify the compiler for the build machine. If `CC_FOR_BUILD' is not specified, `CC' will be used. Be sure to specify
`CC_FOR_BUILD' is `CC' is a cross-compiler to the `host' machine.
CC_FOR_BUILD a native C compiler, defaults to `cc'
CC a native C compiler, the previous variable is preferred
REPORTING BUGS
Report bugs and patches to <config-patches@gnu.org>.
Originally written by Per Bothner.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
autoconf(1), automake(1), autoreconf(1), autoupdate(1), autoheader(1), autoscan(1), config.guess(1), config.sub(1), ifnames(1), libtool(1).
GNU Autoconf 2.69 August 2017 CONFIG.GUESS(1)