Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- fix the build with Clang 3.3 and libcxx (LLVM)
  • Loading branch information
Marcus von Appen committed Dec 28, 2013
1 parent f43cffd commit b230375
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/core/KdTree.h
Expand Up @@ -34,7 +34,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef KdTree_h
#define KdTree_h
#if defined(__clang__) && defined(_LIBCPP_VERSION)
#include <numeric>
#elif defined(__GNUC__)
#include <ext/numeric>
#endif

namespace Partio
{
Expand Down Expand Up @@ -286,7 +290,11 @@ void KdTree<k>::setPoints(const float* p, int n)

// assign sequential ids
_ids.resize(n);
#if defined(__clang__) && defined(_LIBCPP_VERSION)
std::iota(_ids.begin(), _ids.end(), 0);
#elif defined(__GNUC__)
__gnu_cxx::iota(_ids.begin(), _ids.end(), 0);
#endif
// _ids.reserve(n);
// while ((int)_ids.size() < n) _ids.push_back(_ids.size());
_sorted = 0;
Expand Down

0 comments on commit b230375

Please sign in to comment.