[ create a new paste ] login | about

Link: http://codepad.org/8bVlcas3    [ raw code | output | fork ]

C++, pasted on Jan 21:
#include <iostream>

using namespace std;
struct foo
{
};

struct barfoo_base {
  enum bar { ONE, TWO, THREE };
};

template <typename bob = int>
struct barfoo : public barfoo_base
{
  bar action() const { return TWO; }
};

template <barfoo<>::bar eAction = barfoo<>::ONE>
struct IsAction
{
  template <typename bf>
  static bool check(bf const& cState)
  {
    return cState.action() == eAction;
  }  
};

int main(void)
{
  barfoo<foo> c;

  cout << IsAction<>::check(c) << endl;

  return 0;
}


Output:
1
false


Create a new paste based on this one


Comments: