title: Calling Fortran subroutines with optional arguments from C++
body: <p>How would I reference a Fortran function in a C++ header that uses optional arguments?  Would I have a prototype in the header for each possible combination of calls?  Or is this even possible?</p>
  
  <p>For instance, Fortran:</p>
  
  <pre><code>subroutine foo(a, b, c) bind(c)
     real, intent(in), optional :: a, b, c
     ...
  end subroutine foo
  </code></pre>