[ create a new paste ] login | about

Link: http://codepad.org/n7yWIRnQ    [ raw code | output | fork ]

C++, pasted on Nov 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <map>
#include <vector>
#include <string>

struct myStruct
{
  std::string a, b, c, id;
};

int main() {
    map<myStruct, std::vector<size_t> > myMap;
    return 0;
}


Output:
1
2
3
4
5
6
7
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_function.h: In member function 'bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = myStruct]':
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/boost_concept_check.h:358:   instantiated from 'void __gnu_cxx::_BinaryFunctionConcept<_Func, _Return, _First, _Second>::__constraints() [with _Func = std::less<myStruct>, _Return = bool, _First = myStruct, _Second = myStruct]'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_map.h:105:   instantiated from '__gnu_norm::map<myStruct, __gnu_debug_def::vector<unsigned int, std::allocator<unsigned int> >, std::less<myStruct>, std::allocator<std::pair<const myStruct, __gnu_debug_def::vector<unsigned int, std::allocator<unsigned int> > > > >'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/debug/map.h:45:   instantiated from '__gnu_debug_def::map<myStruct, __gnu_debug_def::vector<unsigned int, std::allocator<unsigned int> >, std::less<myStruct>, std::allocator<std::pair<const myStruct, __gnu_debug_def::vector<unsigned int, std::allocator<unsigned int> > > > >'
t.cpp:12:   instantiated from here
Line 226: error: no match for 'operator<' in '__x < __y'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: