std_lib_facilities.h out of date?

2,062 views
Skip to first unread message

Brian

unread,
May 21, 2012, 6:11:36 PM5/21/12
to PPP-public
I am getting a compiler error "This file includes at least one
deprecated or antiquated header which \ may be removed without
further notice at a future date. Please use a \ non-deprecated
interface with equivalent functionality instead. For a \ listing of
replacement headers and interfaces, consult the file \
backward_warning.h."
I had a look at std_lib_facilities.h but editing it is a bit beyond
me. Has anyone successfully updated it?
Thanks
Brian

Art Werschulz

unread,
May 23, 2012, 8:08:32 AM5/23/12
to ppp-p...@googlegroups.com
Hi.

On May 21, 2012, at 6:11 PM, Brian wrote:

> I am getting a compiler error "This file includes at least one
> deprecated or antiquated header which \ may be removed without
> further notice at a future date. Please use a \ non-deprecated
> interface with equivalent functionality instead. For a \ listing of
> replacement headers and interfaces, consult the file \
> backward_warning.h."

Which version of std_lib_facilities.h are you using? Just after the introductory comment block, you'll something that looks like
#ifndef H112
#define H112 200905L
What's the number that appears on the "#define H112" line?

Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y?
Internet: agw STRUDEL comcast.net



Brian

unread,
Jul 7, 2012, 2:43:45 AM7/7/12
to ppp-p...@googlegroups.com
The following is an extract from my copy of  std_lib_facilities.h.

   Revised April 25, 2010: simple_error() added
*/

#ifndef H112
#define H112 201004L

I hope that will identify the version correctly.
I downloaded it from the web site
<http://www.stroustrup.com/Programming/std_lib_facilities.h>
Regards

Brian

Brian

unread,
Jul 7, 2012, 2:55:14 AM7/7/12
to ppp-p...@googlegroups.com

Jeffrey Diaz

unread,
Jul 7, 2012, 3:29:03 AM7/7/12
to ppp-p...@googlegroups.com
I believe this is happening because of the following line in
std_lib_facilities.h:
#include <ext/hash_map>

If we open backward_warning.h we'll see it states on line 50 to use
<unordered_map> instead of <ext/hash_map>, the header <ext/hash_map>
appears to be deprecated. I tried using <unordered_map>, but that
introduced new errors :) Hopefully we'll get a std_lib_facilities.h
update some day. BTW, I'm using GNU compiler g++.
> --
> You received this message because you are subscribed to the Google Groups "PPP-public" group.
> To post to this group, send email to ppp-p...@googlegroups.com.
> To unsubscribe from this group, send email to ppp-public+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ppp-public?hl=en.
>

Brian

unread,
Jul 7, 2012, 5:20:19 PM7/7/12
to ppp-p...@googlegroups.com
Thanks for the feedback Jay.
I found the same.
Regards
Brian


On Saturday, 7 July 2012 17:29:03 UTC+10, Jay Diaz wrote:
I believe this is happening because of the following line in
std_lib_facilities.h:
#include <ext/hash_map>

If we open backward_warning.h we'll see it states on line 50 to use
<unordered_map> instead of <ext/hash_map>, the header <ext/hash_map>
appears to be deprecated. I tried using <unordered_map>, but that
introduced new errors :) Hopefully we'll get a std_lib_facilities.h
update some day. BTW, I'm using GNU compiler g++.

On Mon, May 21, 2012 at 6:11 PM, Brian  wrote:
> I am getting a compiler error "This file includes at least one
> deprecated or antiquated header which \  may be removed without
> further notice at a future date. Please use a \   non-deprecated
> interface with equivalent functionality instead. For a \   listing of
> replacement headers and interfaces, consult the file \
> backward_warning.h."
> I had a look at std_lib_facilities.h but editing it is a bit beyond
> me. Has anyone successfully updated it?
> Thanks
> Brian
>
> --
> You received this message because you are subscribed to the Google Groups "PPP-public" group.
> To post to this group, send email to ppp-p...@googlegroups.com.
> To unsubscribe from this group, send email to ppp-public+unsubscribe@googlegroups.com.

Hare Menjou

unread,
Sep 11, 2012, 4:53:51 AM9/11/12
to ppp-p...@googlegroups.com
"If you are using a newer version of the g++ compiler on Linux, you may run into "deprecation" warnings when using StdLibFacilitiesHeader from the book. StdLibFacilitiesHeaderUbuntu is the same header but modified to avoid that warning; it has only been tested with g++ on Ubuntu Linux, but it should probably work on any version."

http://csil-web.cs.surrey.sfu.ca/cmpt128fall2010/wiki/UsefulSoftware/

Brian

unread,
Oct 10, 2012, 4:02:40 PM10/10/12
to ppp-p...@googlegroups.com
 
Thanks Hare.
What I was after and your class web site looks interesting too.
Regards
Brian

Denis Garcia

unread,
Aug 12, 2013, 7:23:36 AM8/12/13
to ppp-p...@googlegroups.com
Hi,

I would like to download the modified version (because I have the same warning). Unfortunately the link is no longer available.
Does anyone has the StdLibFacilitiesHeaderUbuntu version?

Thanks!

Nwabunwanne Okoye

unread,
Mar 10, 2014, 6:46:01 PM3/10/14
to ppp-p...@googlegroups.com
I don't think it is out of date. What you have to do is go to Header File, Add item, click on the .h.
Make sure you name the program std_lib_facilities.h and save it in Programs section of whatever visual studio you have.
Double click on the header file we just created. Go to http://www.stroustrup.com/Programming/std_lib_facilities.h
Copy everything and paste it in the header code area.
Go to file press save. The computer will tell you to save the file as unicode to keep all characters and such (this will make sure your not missing anything so you won't get errors)
Now everytime you use header you have to add ../../ to it like so: "../../std_lib_facilities.h"

Sorry I didn't get this posted when you needed it.
I was looking for a solution since the same thing happened to me. I kind of figured this out myself.
I am not an expert in computers so I am not sure if I gave a good explanation.
Hope this helps.
 

Jamaal Hunt

unread,
Aug 31, 2014, 5:47:42 PM8/31/14
to ppp-p...@googlegroups.com
I'm curious and it is kinda a dumb question. Am I supposed to copy everything including the point he made to his students? 

/*
simple "Programming: Principles and Practice using C++" course header to
be used for the first few weeks.
It provides the most common standard headers (in the global namespace)
and minimal exception/error support.

Students: please don't try to understand the details of headers just yet.
All will be explained. This header is primarily used so that you don't have
to understand every concept all at once.

Adrian Mowrey

unread,
Aug 31, 2014, 8:55:20 PM8/31/14
to ppp-p...@googlegroups.com
std_lib_facilities.h is supposed to be in the include folder so that you don't have to #include all the header files you usually have to (it's a clever move by the authors in my opinion because it takes your mind off remembering all those header files based on what you're trying to implement). All you have to do is #include "std_lib_facilities.h"; and you're good to go. Maybe that helps...
--
You received this message because you are subscribed to the Google Groups "PPP-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ppp-public+...@googlegroups.com.

To post to this group, send email to ppp-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/ppp-public.
For more options, visit https://groups.google.com/d/optout.


--

--
Kind Regards,

Adrian Mowrey

Nwabunwanne Okoye

unread,
Sep 1, 2014, 10:31:40 AM9/1/14
to ppp-p...@googlegroups.com
It doesn't really matter since the /* */ are just comments. But I would keep those in there incase you get to the point where you want to create your own header files or something and want to look at other header files like this one.
 

Yrjö Pokkinen

unread,
Jun 25, 2015, 2:50:43 AM6/25/15
to ppp-p...@googlegroups.com


maanantai 1. syyskuuta 2014 3.55.20 UTC+3 Adrian Mowrey kirjoitti:
std_lib_facilities.h is supposed to be in the include folder so that you don't have to #include all the header files you usually have to (it's a clever move by the authors in my opinion because it takes your mind off remembering all those header files based on what you're trying to implement). All you have to do is #include "std_lib_facilities.h"; and you're good to go. Maybe that helps...

On Sunday, August 31, 2014, Jamaal Hunt <huntj...@hotmail.com> wrote:
I'm curious and it is kinda a dumb question. Am I supposed to copy everything including the point he made to his students? 

/*
simple "Programming: Principles and Practice using C++" course header to
be used for the first few weeks.
It provides the most common standard headers (in the global namespace)
and minimal exception/error support.

Students: please don't try to understand the details of headers just yet.
All will be explained. This header is primarily used so that you don't have
to understand every concept all at once.

Revised April 25, 2010: simple_error() added
*/

--
You received this message because you are subscribed to the Google Groups "PPP-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ppp-public+unsubscribe@googlegroups.com.

To post to this group, send email to ppp-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/ppp-public.
For more options, visit https://groups.google.com/d/optout.


--

--
Kind Regards,
 
Adrian Mowrey

I use Code::Block to progra C++. When I put "std_lib__facilities.h" to icluded directory and try to use it , I got an error Now I insted use in Hello World!  #include <iostream> and: using namespace std;   , then my program runs perfectly. I think it is a better way to do it.



Yrjo Pokkinen





 

Mursalin Haque

unread,
Jan 4, 2017, 2:41:08 PM1/4/17
to PPP-public
Simple and most elegant solution yet. Thanks dude, I was almost a minute away from quitting altogether but then I saw your post and tried it and succeeded. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages