[ create a new paste ] login | about

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

C++, pasted on Apr 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iterator>

namespace myspace
{
struct mystruct{};
void distance(mystruct a, mystruct b)
{
}

}

int main()
{
using namespace myspace;
using namespace std;

mystruct a,b;
distance(a,b);
}


Output:
1
2
3
4
/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_iterator_base_types.h: In instantiation of 'std::iterator_traits<myspace::mystruct>':
t.cpp:19:   instantiated from here
Line 128: error: no type named 'iterator_category' in 'struct myspace::mystruct'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: