translate C++ template into D2
BLS
nanali at nospam-wanadoo.fr
Mon May 5 10:12:59 PDT 2008
Hi, I'd like to ask how to translate this piece of C++ source.
-code
template <class T> class Lisp;
template <class T> Lisp<T> lisp(const T& x1);
template <class T> Lisp<T> lisp(const T& x1, const T& x2);
template <class T> Lisp<T> lisp(const T& x1, const T& x2, const T& x3);
template <class T> Lisp<T> lisp(const T& x1, const T& x2, const T& x3,
const T& x4);
-end code
further :
template <class T> Lisp<T> lispn(const T& x, int n);
template <class T> Lisp<T> cons(const T& t);
template <class T> Lisp<T> cons(const T& t, const Lisp<T>& list);
template <class T> class Lisp ...........
eof C++
I hope it is possible to build something in D 2 by using :
class Lisp(const T..., I dunno )
Is it possible ?, How to implement ?
Many many thanks in advance !
Bjoern
More information about the Digitalmars-d-learn
mailing list