
<h1 id="operator []">
 <a href="#/api/dtype_t/operator_bracket" class="anchor">
   <span>operator []</span>
  </a>
</h1>

<div class="signature">

<hr>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><span class="token keyword">const</span> <a href="#/api/dtype_t/">occa::dtype&#95;t</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">int</span> field)</code>
      <code class="mobile-only"><span class="token keyword">const</span> <a href="#/api/dtype_t/">occa::dtype&#95;t</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">int</span> field
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/dtype/dtype.hpp#L164" target="_blank">Source</a>
    </div>
    
  </div>

  <div class="definition-container">
    <div class="definition">
      <code class="desktop-only"><span class="token keyword">const</span> <a href="#/api/dtype_t/">occa::dtype&#95;t</a>&amp; operator [] (<span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;field)</code>
      <code class="mobile-only"><span class="token keyword">const</span> <a href="#/api/dtype_t/">occa::dtype&#95;t</a>&amp; operator [] (
    <span class="token keyword">const</span> <span class="token keyword">std::string</span> &amp;field
)</code>
      <div class="flex-spacing"></div>
      <a href="https://github.com/libocca/occa/blob/7d02eac1/include/occa/dtype/dtype.hpp#L174" target="_blank">Source</a>
    </div>
    
  </div>

  <hr>
</div>


<h2 id="description">
 <a href="#/api/dtype_t/operator_bracket?id=description" class="anchor">
   <span>Description</span>
  </a>
</h2>

Return the [occa::dtype_t](/api/dtype_t/) for the field by the given index
