Change parallel_stable_sort to boost::sort::parallel_stable_sort.  The public api is entirely in the boost::sort namespace, the documentation just omits it for brevity.

On Sun, Jun 24, 2018 at 6:58 AM, ian D Chivers via Boost-users <boost-users@lists.boost.org> wrote:
I have installed boost to work with

Windows

  Microsoft Visual C++

  Cygwin g++

Linux

  openSuSe

I can compile and run test programs
On all three versions.

However I get the following error messages when trying To call one of the
routines in

https://www.boost.org/doc/libs/1_67_0/libs/sort/doc/html/sort/parallel.html

Here is the cygwin message

$ g++ ch3604.cxx
ch3604.cxx: In function 'int main()':
ch3604.cxx:155:3: error: 'parallel_stable_sort' was not declared in this
scope
   parallel_stable_sort( x.begin() , x.end() );

Here is the Microsoft message

C:\document\cpp\examples>cl /EHsc /I "C:\Program Files\boost\boost_1_67_0"
-O2 /F 1000000000 ch3604.cxx
Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26129 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

ch3604.cxx

I get a similar message on openSuSe linux.

Here is the top part of the source file

#####

#include <iostream>
#include <algorithm>
#include <array>
#include <chrono>
#include <random>
#include <string>
#include <boost/sort/sort.hpp>

using namespace std;

#####

Here is a section of the main program

#####

  parallel_stable_sort( x.begin() , x.end() );

  heading = "Boost sort     ";
  t = timer_01.elapsed();
  print_time(heading, t);

  cout << x[0] << "    " << x[nr-1] << endl;

#####

I get similar messages when trying to use any of the serial
Or parallel routines.

The documentation says that I only need to include

#include <boost/sort/sort.hpp>

To make things available.

Any thoughts?

Ian Chivers








_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users