Who's quoting man pages?  I didn't quote man pages -- I'm describing what
the C++ standard says.  And of course it makes a difference -- I didn't
saying that it doesn't.  What I said was:

   1. The behavior of <> vs. "" is implementation-defined.
   2. The use of <> to indicate "system"  include files is imposing some
   semantic meaning that is not defined by the C++ standard.

The only explicit difference between the two is that a sequence of
characters within <> does not necessarily need to be the name of a file.
That means that a compiler is free to implement:

#include <vector>

as it sees fit.  Most implementations will have a file named "vector"
somewhere in a system-defined place, but it's not required to. Using ""
requires a source file of that name be included.  How that file is found is
implementation-dependent.

The behavior you describe regarding "searching the current directory" or
not is a commonly-implemented difference between <> and "", but it's not
guaranteed by the standard.

Probably the best thing to do is replace all uses of <> with "", but it's
probably not a high priority for most people.

Dave



                                                                                       
                            
                      "Murphy, James"                                                  
                            
                      <James.Murphy@exc         To:      
"'[EMAIL PROTECTED]'"                           
                      elergy.com>               <[EMAIL PROTECTED]>          
                            
                                                cc:      (bcc: David N 
Bertoni/CAM/Lotus)                          
                      08/17/2001 03:53          Subject: RE: Using #include "" instead 
of #include <>              
                      PM                                                               
                            
                      Please respond to                                                
                            
                      xerces-c-dev                                                     
                            
                                                                                       
                            
                                                                                       
                            



Oh it makes a big difference on Windows.  You quote man pages I'll quote
the
MSDN!

Quoted form
-----------
This form instructs the preprocessor to look for include files in the same
directory of the file that contains the #include statement, and then in the
directories of whatever files that include that file. The preprocessor then
searches along the path specified by the /I compiler option, then along
paths specified by the INCLUDE environment variable.

Angle-bracket form
------------------
This form instructs the preprocessor to search for include files first
along
the path specified by the /I compiler option, then along the path specified
by the INCLUDE environment variable.

Note the lack of searching in the current directory first when using the
angle brackets.

Jim

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 17, 2001 3:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Using #include "" instead of #include <>
>
>
>
> Well, that's imposing something on C/C++ which is not defined by the
> standard, so I don't know whether I agree with that behavior
> or not.  Are
> you saying that because makedeps has decided that <> means a
> system header
> that everyone should believe that as well?
>
> Dave
>
>
>
>
>
>                     jason@openinfor
>
>                     matics.com             To:
> [EMAIL PROTECTED]
>                     (Jason E.              cc:     (bcc:
> David N Bertoni/CAM/Lotus)
>                     Stewart)               Subject:     Using
> #include "" instead of #include <>
>
>
>                     08/17/2001
>
>                     02:21 PM
>
>                     Please respond
>
>                     to xerces-c-dev
>
>
>
>
>
>
>
>
> "Murphy, James" <[EMAIL PROTECTED]> writes:
>
> > While were on the subject of upsetting apple carts -
> >
> > I would also like to change the include file convention to use
> > quotes instead of angle brackets.  In this way I wouldn't have to
> > modify my include path at all for any of my projects!  Everything
> > would work relative to each file (something the preprocessor wont do
> > if you use <> to include)
>
> I've wondered why so many projects do this. #include <foo.h> and
> #include "foo.h" are definately handled different on Unix systems,
> #especially by makedepends.
>
> Reading the man page for cpp says (for example):
>
>        -MM [-MG]
>               Like  `-M' but mention only the files included with
>               `#include "file"'.  System  header  files  included
>               with `#include <file>' are omitted.
>
> Also see the '-I-' entry.
>
> angle brackets are for 'system header' files. Any project header files
> should be referenced by double quotes. Perhaps windows doesn't care,
> but unix does.
>
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to