title: How can I create an instance of a generic enum in Swift
body: <p>I'm trying to write a function in swift that creates a rawValue enum in a generic function like this:</p>
  
  <pre><code>enum STATE: String {
      case OK = "OK"
      case ERROR = "ERROR"
  }
  
  func createEnum&lt;E: RawRepresentable&gt;(rawValue: T.Type) {
      return E(rawValue: rawValue) // compiler error 
  }
  </code></pre>
  
  <p>Am I missing anything?</p>