Skip to content

Instantly share code, notes, and snippets.

@brycelelbach
Created September 20, 2010 18:46
Show Gist options
  • Save brycelelbach/588414 to your computer and use it in GitHub Desktop.
Save brycelelbach/588414 to your computer and use it in GitHub Desktop.
wash@Pegasus:~/sandbox$ cat foo.cpp
template<typename T> struct A {
typedef T type;
template<typename X> struct AA {
typedef X type;
};
};
namespace x {
template<typename T> struct B {
typedef T type;
};
}
template<>
struct A<double> {
typedef double type;
};
int main (void) {
A<int> a0;
A<double> a1;
A<int> a2;
x::B<int> b0;
x::B<float> b1;
A<int>::AA<float> aa0;
}
wash@Pegasus:~/sandbox$ clang++ -cc1 -load ~/ariel/build/default/Profiler/libarielProfiler.so -plugin arielProfiler foo.cpp
A<int>::AA -> 1
A -> 2
x::B -> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment