E
Exits Funnel
I've got this code:
//Begin foo.cpp
#include <utility>
#include <bits/stl_function.h>
typedef std:air<int, int> int_pair_t;
template<>
struct std::less<int_pair_t> { };
//End foo.cpp
g++ has this to say on the issue:
foo.cpp:7: specializing `struct std::less<int_pair_t>' in different
namespace
/usr/include/c++/3.2.3/bits/stl_function.h:195: from definition of `
template<class _Tp> struct std::less'
This seems reasonable (though for what it's worth, it compiles under
VC7.1). I can fix the problem by wrapping the specialization in a
'namespace std' block but I'm wondering if this is prudent or is there
some other solution. Thanks.
-exits
//Begin foo.cpp
#include <utility>
#include <bits/stl_function.h>
typedef std:air<int, int> int_pair_t;
template<>
struct std::less<int_pair_t> { };
//End foo.cpp
g++ has this to say on the issue:
foo.cpp:7: specializing `struct std::less<int_pair_t>' in different
namespace
/usr/include/c++/3.2.3/bits/stl_function.h:195: from definition of `
template<class _Tp> struct std::less'
This seems reasonable (though for what it's worth, it compiles under
VC7.1). I can fix the problem by wrapping the specialization in a
'namespace std' block but I'm wondering if this is prudent or is there
some other solution. Thanks.
-exits