class <enum class> support

21 views
Skip to first unread message

Logan Perkins

unread,
Jan 28, 2016, 6:50:19 PM1/28/16
to xdress
I have a template class, declared as follows

  template<class T>
  class A{
  public:
    std::map<int, double> y;
    T z;
  };

And an enum class

  enum class C {
    Oct = 1 << 0,           
    Hex = 1 << 1,                 
  };

followed by creating the class I want to wrap

  typedef A<C> D;


running xdress fails with the error

ERROR: could not find class 'D'

If I subclass D, 

  class E: public D{};

I get this error instead
ERROR: unknown literal: 'hoover::C'


I think this means I need to add something to the type system, but I'm not sure what.  
This is based off the example code in docs/mypack, using castxml via a gccxml wrapper (to support c++11, which mostly seems to work)

Any advice on how to get template classes working would be much appreciated.

Reply all
Reply to author
Forward
0 new messages