{"action":"created","issue":{"url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/16","labels_url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/16/comments","events_url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/16/events","html_url":"https://github.com/t-lutz/ParallelSTL/issues/16","id":117399605,"number":16,"title":"Compatibility with libc++","user":{"login":"maribu","id":2041729,"avatar_url":"https://avatars.githubusercontent.com/u/2041729?v=3","gravatar_id":"","url":"https://api.github.com/users/maribu","html_url":"https://github.com/maribu","followers_url":"https://api.github.com/users/maribu/followers","following_url":"https://api.github.com/users/maribu/following{/other_user}","gists_url":"https://api.github.com/users/maribu/gists{/gist_id}","starred_url":"https://api.github.com/users/maribu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maribu/subscriptions","organizations_url":"https://api.github.com/users/maribu/orgs","repos_url":"https://api.github.com/users/maribu/repos","events_url":"https://api.github.com/users/maribu/events{/privacy}","received_events_url":"https://api.github.com/users/maribu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-17T17:01:27Z","updated_at":"2015-11-18T10:41:41Z","closed_at":null,"body":"Thanks for your fast fix for clang. I'd like to annoy you again: ParallelSTL\r\ndoes not compile against libc++ (http://libcxx.llvm.org):\r\n\r\n\tclang++ -std=c++11 -stdlib=libc++ -lc++abi -pthread prime.cpp -o prime\r\n\r\nfails with\r\n\r\n\tprime.cpp:74:46: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\tauto time_seq = find_prime(experimental::parallel::seq, numbers);\r\n\t\t\t\t\t\t\t\t   ~~~~~~~~~~~~~~^\r\n\tprime.cpp:78:46: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\tauto time_par = find_prime(experimental::parallel::par, numbers);\r\n\t\t\t\t\t\t\t\t   ~~~~~~~~~~~~~~^\r\n\tprime.cpp:86:47: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\tauto time_seq = count_prime(experimental::parallel::seq, numbers);\r\n\t\t\t\t\t\t\t\t\t~~~~~~~~~~~~~~^\r\n\tprime.cpp:90:47: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\tauto time_par = count_prime(experimental::parallel::par, numbers);\r\n\t\t\t\t\t\t\t\t\t~~~~~~~~~~~~~~^\r\n\tprime.cpp:100:30: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\treplace_if(experimental::parallel::seq, begin(copy), end(copy), isPrime, 0);\r\n\t\t\t\t   ~~~~~~~~~~~~~~^\r\n\tprime.cpp:107:30: error: no member named 'parallel' in namespace\r\n\t\t  'std::experimental'\r\n\t\treplace_if(experimental::parallel::par, begin(copy), end(copy), isPrime, 0);\r\n\t\t\t\t   ~~~~~~~~~~~~~~^\r\n\r\nObviously `#include <experimental/algorithm>` is already used by `libc++`. Also\r\ne. g. in `include/experimental/bits/parallel/algos/par/sort.h` the function\r\n`diffract` expects a functor as third argument, but std::sort is a template in\r\nlibc++. I'm not sure what a good fix would be here, but simply writing a wrapper\r\nfunctor which calls std::sort would work as a quick and dirty solution.\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/comments/157675492","html_url":"https://github.com/t-lutz/ParallelSTL/issues/16#issuecomment-157675492","issue_url":"https://api.github.com/repos/t-lutz/ParallelSTL/issues/16","id":157675492,"user":{"login":"t-lutz","id":6529936,"avatar_url":"https://avatars.githubusercontent.com/u/6529936?v=3","gravatar_id":"","url":"https://api.github.com/users/t-lutz","html_url":"https://github.com/t-lutz","followers_url":"https://api.github.com/users/t-lutz/followers","following_url":"https://api.github.com/users/t-lutz/following{/other_user}","gists_url":"https://api.github.com/users/t-lutz/gists{/gist_id}","starred_url":"https://api.github.com/users/t-lutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-lutz/subscriptions","organizations_url":"https://api.github.com/users/t-lutz/orgs","repos_url":"https://api.github.com/users/t-lutz/repos","events_url":"https://api.github.com/users/t-lutz/events{/privacy}","received_events_url":"https://api.github.com/users/t-lutz/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T10:41:41Z","updated_at":"2015-11-18T10:41:41Z","body":"This works just as well:\r\n```\r\nclang++ -std=c++14 -stdlib=libc++ -lc++abi -pthread prime.cpp -o prime -I../include\r\n```\r\nThe program runs just fine.\r\n\r\nThe `-v` flag shows the include directories and their order:\r\n```\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n ../include\r\n /usr/include/c++/v1\r\n /usr/local/include\r\n /home/tlutz/local/compilers/clang/3.6.2/bin/../lib/clang/3.6.2/include\r\n /usr/include\r\nEnd of search list.\r\n```\r\n\r\n"}}