~kubuntu-members/kmix/4.11

Viewing all changes in revision 1804.

  • Committer: Raphael Kubo da Costa
  • Date: 2013-09-03 09:55:45 UTC
  • Revision ID: git-v1:f184967a01381ca43a02d44edf3158e6cc0be376
Properly detect the location of STL's shared_ptr.

std::shared_ptr is a C++11 feature, whose location (and existence) in STL
implementations of previous C++ standards varied -- one widespread example
is GCC's libstdc++, which has a shared_ptr implementation in <tr1/memory>
that was shipped long before C++11.

However, including it unconditionally breaks the build if any other STL
implementation (such as libc++) is used instead.

We now check if std::shared_ptr is present in the <memory> header and then
try std::tr1::shared_ptr as a fallback.

REVIEW:         112434

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: