public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* errors in porting on gcc 3.4.6 from gcc 3.2.3
@ 2007-05-15 10:47 kushwaha
  2007-05-15 11:14 ` Lionel B
  0 siblings, 1 reply; 4+ messages in thread
From: kushwaha @ 2007-05-15 10:47 UTC (permalink / raw)
  To: gcc-help


hi all..

Following is the part of a code giving error with gcc 3.4.6  which
previously compiled with gcc 3.2.3. As i am porting the software so can't
change the code. is there any way to get it compiled without modifying
actual code??


//BpHashMap.h

template <class TKey, class TValue>
class BpHashMap {

  public :

    TValue getValue(TValue val);
    TKey getKey(TKey key);
};


class HString_Key {

    const char* mpcId;
    unsigned long mulId;

  public :

    HString_Key() : mpcId(" "), mulId(0) { }
    HString_Key(const char* apcId, unsigned long aulId) : mpcId(apcId),
mulId(aulId) { }

};


template <class T>
class Equal_to_HString_Key {

    HString_Key  key;

  public :

    Equal_to_HString_Key(const char* apcCallId, unsigned long apcHashId) {
      key.mpcCallId = apcCallId;
      key.mulHashId = apcHashId;
    }

    void Id();
};


//BpHashMap.C

#include "BpHashMap.h"
#include <iostream>

using namespace std;

template <class TKey, class TValue>
TValue
BpHashMap<TKey, TValue>::getValue(TValue val) {
    TValue t = val;

    return t;
}

template <class TKey, class TValue>
TKey
BpHashMap<TKey, TValue>::getKey(TKey key) {
    TKey t = key;

    return t;
}

// just to find the result of compilation
int main()
{
    BpHashMap<char, int> obj1;

    cout<<obj1.getValue(25);
    cout<<endl;
    cout<<obj1.getKey('a');
    cout<<endl;

    return 0;
}

-- 
View this message in context: http://www.nabble.com/errors-in-porting-on-gcc-3.4.6-from-gcc-3.2.3-tf3757763.html#a10620590
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-15 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 10:47 errors in porting on gcc 3.4.6 from gcc 3.2.3 kushwaha
2007-05-15 11:14 ` Lionel B
2007-05-15 11:49   ` kushwaha
2007-05-15 12:19     ` Lionel B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).