title: expand file names that have environment variables in their path
body: <p>What's the best way to expand </p>
  
  <pre><code>${MyPath}/filename.txt to /home/user/filename.txt
  </code></pre>
  
  <p>or </p>
  
  <pre><code>%MyPath%/filename.txt to c:\Documents and settings\user\filename.txt
  </code></pre>
  
  <p>with out traversing the path string looking for environement variables directly?
  I see that wxWidgets has a <a href="http://www.gnu-darwin.org/www001/src/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/src/common/config.cpp" rel="noreferrer">wxExpandEnvVars</a> function.  I can't use wxWidgets in this case, so I was hoping to find a boost::filesystem equivalent or similar.  I am only using the home directory as an example, I am looking for general purpose path expansion.</p>