[ROOT] problem compiling inside root: map within map

From: Suyong Choi (suyong@fnal.gov)
Date: Fri Oct 11 2002 - 21:10:08 MEST


Hi

I can't seem to compile the following in root v03.03.07 in both
KCC and gcc versions. I am able to compile it in v03.02.07.
Any ideas would be welcome.

Regards,
Suyong

#include <iostream>
#include <fstream>
#include <map>

typedef std::map<int, int> nmap;
typedef std::map<int, nmap > runnmap;

class test {
         public:
                 test() {};
                 ~test() {};
         private:
                 runnmap _lbn;
};



root [3] .L test.C++
Info in <TUnixSystem::ACLiC>: creating shared library /prj_root/857/higgs_4/suyong/root_select_p111100test/./test_C.so
"/usr/products/kai/IRIX-6-5/v4_0f/KCC_BASE/include/utility", line 47: error #289:
           no instance of constructor "std::map<Key, T, Compare,
           Allocator>::map [with Key=int, T=int, Compare=std::less<int>,
           Allocator=std::allocator<std::pair<const int, int>>]" matches the
           argument list
             argument types are: (const std::map<int, int, std::less<int>,
                       std::allocator<int>>)
       template<class U, class V> pair(const pair<U, V> &p): first(p.first), second(p.second) {}
                                                                                    ^
           detected during instantiation of "std::pair<T1, T2>::pair(const
                     std::pair<U, V> &) [with T1=const int, T2=std::map<int,
                     int, std::less<int>, std::allocator<std::pair<const int,
                     int>>>, U=int, V=std::map<int, int, std::less<int>,
                     std::allocator<int>>]" at line 92 of
                     "/prj_root/857/higgs_4/suyong/root_select_p111100test/./jaa
                     a2_Iaf.C"

1 error detected in the compilation of "/prj_root/857/higgs_4/suyong/root_select_p111100test/./jaaa2_Iaf.C".
KCC: Compilation failed.


Info in <TUnixSystem::ACLiC>: creating shared library /prj_root/857/higgs_4/suyong/root_select_p111100test/./test_C.so
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_threads.h: In instantiation of `__gthread_mutex_t std::_Swap_lock_struct<0>::_S_swap_lock':
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_threads.h:122:   instantiated from here
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_threads.h:115: warning: aggregate
    has a partly bracketed initializer
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_pair.h: In constructor
    `std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = int, _U2
    = std::map<int, int, std::less<int>, std::allocator<int> >, _T1 = const int,
    _T2 = std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
    int> > >]':
/prj_root/857/higgs_4/suyong/root_select_p111100test/eaaa2ZC2e.C:92:   instantiated from here
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_pair.h:88: no matching
    function for call to `std::map<int, int, std::less<int>,
    std::allocator<std::pair<const int, int> > >::map(const std::map<int, int,
    std::less<int>, std::allocator<int> >&)'
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_map.h:138: candidates
    are: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp,
    _Compare, _Alloc>&) [with _Key = int, _Tp = int, _Compare = std::less<int>,
    _Alloc = std::allocator<std::pair<const int, int> >]
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_map.h:127:
       std::map<_Key, _Tp, _Compare, _Alloc>::map(const _Compare&,
    std::_Rb_tree<_Key, std::pair<const _Key, _Tp>,
    std::_Select1st<std::pair<const _Key, _Tp> >, _Compare,
    _Alloc>::allocator_type& = std::_Rb_tree<_Key, std::pair<const _Key, _Tp>,
    std::_Select1st<std::pair<const _Key, _Tp> >, _Compare,
    _Alloc>::allocator_type()) [with _Key = int, _Tp = int, _Compare =
    std::less<int>, _Alloc = std::allocator<std::pair<const int, int> >]
/usr/products/gcc/IRIX-6-5/v3_1/include/g++-v3/bits/stl_map.h:124:
       std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key = int, _Tp = int,
    _Compare = std::less<int>, _Alloc = std::allocator<std::pair<const int, int>
    >]
g++: /prj_root/857/higgs_4/suyong/root_select_p111100test/./eaaa2ZC2e.o: No such file or directory
Error in <ACLiC>: Compilation failed!



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET