[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    HPUX-DEVTOOLS: Error declaring class
From:       "DY, JERRY U (SBCSI)" <jd2419 () sbc ! com>
Date:       2003-09-03 19:00:17
[Download RAW message or body]

I get the following error:

Error 628: "test2.C", line 12 # "C<nil_t> jerry" ["test2.C", line 12] cannot
be defined to have an incomplete type.
            C<nil_t> jerry;
                     ^^^^^

Here's the source... would somebody pls. help me figure out why it is
erroring? Thanks!

struct nil_t {};

template <typename T>
struct C {
        int len;
        C(): len(-1) {}

        C (C<nil_t> const& other): len(other.length()) {}
};

int main () {
        C<nil_t> jerry;
};

-Jerry
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic