Ohhh finally got it, you have to have the template <> before the function, and it also has to be put in namespace std, otherwise the compiler will again complain.
#include <queue>
#include <list>
#include <cstdio>
using namespace std;
namespace std {
template<>
void queue<int, list<int> >:: Pop() {
printf("here\n");
c.pop_front();
}
}
int main()
{
int out;
queue<int, list<int> > myqueue;
myqueue.push(5);
myqueue.push(6);
myqueue.push(7);
out = myqueue.front();
printf("%i\n", out);
myqueue.pop();
printf("%i\n", out);
out = myqueue.front();
printf("%i\n", out);
myqueue.pop();
printf("%i\n", out);
out = myqueue.front();
printf("%i\n", out);
myqueue.pop();
printf("%i\n", out);
}