deprecated header

L

Lieven

I'm trying to use is_sorted.
When I do #include<algo.h>, I get:

/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider
using one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the <X.h> header for C++
includes, or <sstream> instead of the deprecated header <strstream.h>. To
disable this warning use -Wno-deprecated.


When I do #include<algorithm>, I get:

file.h:158: error: `is_sorted' undeclared (first use this function)
file.h:158: error: (Each undeclared identifier is reported only once for
each function it appears in.)
 
V

Victor Bazarov

Lieven said:
I'm trying to use is_sorted.

There is no 'is_sorted' in Standard C++.
When I do #include<algo.h>, I get:

/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This
file includes at least one deprecated or antiquated header. Please
consider
using one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the <X.h> header for C++
includes, or <sstream> instead of the deprecated header <strstream.h>. To
disable this warning use -Wno-deprecated.


When I do #include<algorithm>, I get:

file.h:158: error: `is_sorted' undeclared (first use this function)
file.h:158: error: (Each undeclared identifier is reported only once for
each function it appears in.)

Well, there is no 'is_sorted'. You could use 'adjacent_find' with your
own predicate to see if any of the objects are not in the right order.

V
 
L

Lieven De Keyzer

Tom said:
Do:
#include <ext/algorithm>
You might want to look in the ext folder - it includes quite a few
useful library extensions, such as hashed containers, custom allocators,
etc.

Tom

Still doesn't work. Strangely enough only for this file. When I create a
test case it does work with #include<ext/algorithm>.
 
T

Tom Widmer

Lieven said:
I'm trying to use is_sorted.
When I do #include<algo.h>, I get:

/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider
using one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the <X.h> header for C++
includes, or <sstream> instead of the deprecated header <strstream.h>. To
disable this warning use -Wno-deprecated.


When I do #include<algorithm>, I get:

file.h:158: error: `is_sorted' undeclared (first use this function)
file.h:158: error: (Each undeclared identifier is reported only once for
each function it appears in.)

Do:
#include <ext/algorithm>
You might want to look in the ext folder - it includes quite a few
useful library extensions, such as hashed containers, custom allocators,
etc.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top