Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Cheng__Ming
Beginner
121 Views

error #135

My class :

template <typename Key, typename T, typename CharClass = Printable>
class TMap
{
        //...  Dummy Declaration, allow only pointer specialization  ...//
};

template <typename Key, typename T, typename CharClass>
class TMap <Key*,T*,CharClass>
{
private:
    typedef TNode<T,CharClass>      Node;
    ......
 public:

    class iterator
    {
    private:
        size_t  m_Indx;
        const TMap*     m_pTMap;

    public:
        iterator()
        {
                m_pTMap = NULL;
                m_Indx = 0;
        }
        ......
    }
    
    friend class TMap <Key*,T*,CharClass>::iterator;
    
    TMap()
        {
                m_NodePool.Init();
                m_NodePool.SetDPoolName("FtMap_DPOOL");
        }
}

But when I compile it with -std=c++11, I got this error:

 

/opt/intel/system_studio_2019/bin/icpc -rdynamic -std=c++11 -g -fpic -fno-strict-aliasing -rdynamic -I./include -I../include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/AS7 -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/cbase/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/mktutil/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/symbase/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/depth/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/csock/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/msg/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/utl/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/utils/include -I/fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/svrutils/include -Wreturn-type -Wno-deprecated -Wall -Wno-maybe-uninitialized -wd858 -Werror -O2 -DPLATFORM_AS3 -DPLATFORM_AS4 -DPLATFORM_AS5 -DPLATFORM_AS5_64 -DPLATFORM_AS6 -DPLATFORM_AS6_64 -DPLATFORM_AS7 -DUSE_FLEX_ONE_API -DFOR_UNIX -DFOR_LINUX -DFOR_DONGLE -D_GNU_SOURCE -DUSE_NSS -DUSE_GTK -Dft_ext_h_ -D__STL_PTHREADS -DRMS_US_RELEASE -DUSEOLDDEPTHSYM -DUSELONGEXECTAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D__STL_PTHREADS -c MXDataFeed.cpp -o AS7/MXDataFeed.o In file included from ./include/MXCache.h(10), from MXCache.cpp(4): /fs02/home/jenkins/workspace/Rel-15-1-54_INTEL/utils/include/FtMap.h(292): error #135: class template "FtMap::TMap<Key *, T *, CharClass>" has no member "iterator" friend class TMap <Key*,T*,CharClass>::iterator; ^

0 Kudos
3 Replies
Viet_H_Intel
Moderator
121 Views

Do you also get the error with g++?

Cheng__Ming
Beginner
121 Views

I don't have this issue with g++. whether 11/14 or 17. the code has been there many years.

Viet_H_Intel
Moderator
121 Views

You can suppress this error by adding -wd135.

Reply