Skip to content

Instantly share code, notes, and snippets.

@jyasskin
Created July 16, 2010 15:21
Show Gist options
  • Save jyasskin/478488 to your computer and use it in GitHub Desktop.
Save jyasskin/478488 to your computer and use it in GitHub Desktop.
# 1 "bad.h" 1
template <class A> struct MisplacedDbg;
# 1 "bad_partial.h"
template<class T> struct MisplacedDbg<T*>;
# 1 "bad_full.h"
struct Full;
template<> struct MisplacedDbg<Full>;
# 1 "util.h"
struct Arg;
typedef MisplacedDbg<Arg> Typedef1;
typedef MisplacedDbg<Arg*> Typedef2;
typedef MisplacedDbg<Full> Typedef3;
template<typename T> struct Base {
virtual ~Base() {
}
};
# 1 "full.h"
template <> struct MisplacedDbg<Full> : public Base<int> {
};
# 1 "partial.h"
template <class T> struct MisplacedDbg<T*> : public Base<int> {
};
# 1 "class.h"
template <class A> struct MisplacedDbg : public Base<int> {
};
# 1 "vars.cc"
static MisplacedDbg<Arg> static_var1;
static MisplacedDbg<Arg*> static_var2;
static MisplacedDbg<Full> static_var3;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment