title: Apple and shared_ptr
body: <p>I seem to be missing something here. I moved from <code>boost::shared_ptr</code> to <code>std::shared_ptr</code>. <code>shared_ptr</code> was part of TR1 back in the mid-2000s, and it should be available everywhere in 2012.</p>
  
  <p>Trying to use <code>shared_ptr</code> under Apple gets me a slew of undefined references:</p>
  
  <pre><code>SecureArray.h:26:12: error: no member named 'shared_ptr' in
        namespace 'std'
  using std::shared_ptr;
        ~~~~~^
  SecureArray.h:27:12: error: no member named 'tr1' in namespace
        'std'
  using std::tr1::shared_ptr;
        ~~~~~^
  SecureArray.h:487:5: error: unknown type name 'shared_ptr'
      shared_ptr&lt;SecureVector&gt; m_vector;
  </code></pre>
  
  <p>A typical compiler command is as follows (both GCC and Clang fail):</p>
  
  <pre><code>clang++ -g2 -ggdb -O0 -fcatch-undefined-cxx0x-behavior
    -DSAFEINT_DISALLOW_UNSIGNED_NEGATION=1 -pipe -std=c++0x -Wall -Wextra
    -Wno-unused-parameter -Wno-tautological-compare 
    -I. -I./esapi -I./deps -I/usr/local/include -I/usr/include -fpic
    -c src/DummyConfiguration.cpp -o src/DummyConfiguration.o
  </code></pre>
  
  <p>I'm trying to include it as follows (I believe I need to tweak this, but I don't recall the C++ syntax to say "look here, or look there"):</p>
  
  <pre><code>#include &lt;memory&gt;
  using std::shared_ptr;
  using std::tr1::shared_ptr;
  </code></pre>
  
  <p>Apple's man pages are not turning up anything:</p>
  
  <pre><code>$ man shared_ptr
  No manual entry for shared_ptr
  $ man -k shared_ptr
  shared_ptr: nothing appropriate
  </code></pre>
  
  <p>I have Mac OS X 10.8 (fully patched), Xcode (fully patched), and Command Line Tools installed.</p>
  
  <p>So how does one use a std::shared_ptr on Apple platforms?</p>