title: How to expose static constexpr from cython
body: <p>I need to wrap the following demo example from cpp to cython for using in Python</p>
  
  <pre><code>class Foo1 : public MFoo&lt;unsigned int&gt; { 
  public:
      constexpr Foo1(unsigned int val) : MFoo{val} {}
      }
  };
  
  class Foo{
  public:
      static constexpr Foo1 any {0};
      static constexpr Foo1 one {1&lt;&lt;1};
      static constexpr Foo1 two {1&lt;&lt;2};
  };
  </code></pre>
  
  <p>This is what I currently have 
  file.pxd</p>
  
  <pre><code>cdef extern from "../MFoo.hpp":
      cdef cppclass MFoo:
          pass
  
  cdef extern from "../header.hpp":
      cdef cppclass Foo1(MFoo):
          pass
  
  cdef extern from "../header.hpp":
      cdef cppclass Foo:
          ###@staticmethod
          Foo1 _any "Foo::any"
          Foo1 _one "Foo::one"
          Foo1 _two "Foo::two"
  ###any=_any
  ### I also need to link my cpp definitions of any,one and two 
  ###to cython file but I am facing Error:Python object cannot be declared extern
  </code></pre>
  
  <p>My file.pyx</p>
  
  <pre><code>def Bar(self,PyFoo1 abc)
      return file.Bar(######) # how would I call something like Foo::one       
  </code></pre>
  
  <p>I need to know how to wrap this in cython. I am using <a href="https://stackoverflow.com/questions/25181964/how-to-expose-a-constexpr-to-cython">How to expose a constexpr to Cython?</a>
  which is similar but still not very useful</p>