Boost logo

Boost Users :

Subject: Re: [Boost-users] query regarding parallel algorithms and error message
From: ian D Chivers (ian_at_[hidden])
Date: 2018-06-26 18:00:47


Thanks to Steven Watanabe

/permissive-

Fixed the Microsoft problem.

Now compiles and runs.

Ian

-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Steven Watanabe via Boost-users
Sent: 26 June 2018 00:57
To: ian D Chivers via Boost-users
Cc: Steven Watanabe
Subject: Re: [Boost-users] query regarding parallel algorithms and error message

AMDG

On 06/25/2018 12:49 PM, ian D Chivers via Boost-users wrote:
>
> $ g++ -Ofast -std=c++11 -Wl,--stack,0x100000000 ch3604.cxx
> ch3604.cxx: In function ‘int main()’:
> ch3604.cxx:155:16: error: ‘parallel_stable_sort’ is not a member of ‘boost::sort’
> boost::sort::parallel_stable_sort( x.begin() , x.end() );
> ^~~~~~~~~~~~~~~~~~~~
>

Are you sure that you're not missing a #include?
It works for me.

#include <boost/sort/sort.hpp>
#include <vector>

int main() {
  std::vector<int> x = { 3, 1, 4 };
  boost::sort::parallel_stable_sort( x.begin() , x.end() );
}

>
> <snip>
> gcc version 7.3.0 (GCC)
> <snip>
> Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26129 for x64
> <snip>
>
> ch3604.cxx
>
> C:\Program Files\boost\boost_1_67_0\boost/sort/parallel_stable_sort/parallel_stable_sort.hpp(132): error C2146: syntax error: missing ')' before identifier 'or'
>> <snip>
>
> I presume that if I replace the or with something belonging to an earlier standard that this may get me a bit further.
>

`or` was a keyword in C++98 (See [lex.digraph]). Try
compiling with /permissive-

In Christ,
Steven Watanabe
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net