codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> class A { enum { value=1 }; // private }; template <int i> // bug appears only if B is a template struct B { enum { value=A::value }; // <- silently access private member }; int main() { std::cout << B<1>::value << std::endl; return 0; }
Private
[
?
]
Run code