Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #3825
| From | "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Destructors can copying objects |
| Date | 2011-04-16 15:57 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ioc77p$oa6$1@dont-email.me> (permalink) |
| References | (2 earlier) <in8ob0$ju1$4@reader1.panix.com> <4d984899$0$6987$9b4e6d93@newsspool4.arcor-online.net> <ioaisv$sah$1@reader1.panix.com> <ioaldo$4o8$1@dont-email.me> <4da976d8$0$6772$9b4e6d93@newsspool3.arcor-online.net> |
* Peter Remmers, on 16.04.2011 13:00:
> Am 16.04.2011 01:47, schrieb Alf P. Steinbach /Usenet:
>>
>> An alternative that is /non-standard/ and /not entirely reliable/, but that is
>> textually much cleaner, is to use a '#pragma once', like so:
>>
>>
>> #pragma once
>>
>> //... text of header file
>>
>>
>> The pragma is problematic when one employs symbolic links to files.
>
> Why would anyone do such a thing?
Well, people have stated directly (on SO) that they do employ symbolic links and
prefer that. But as far as I recall they have not stated why they employ
symbolic links, except for general convenience. So this is speculation, but
consider a library of sublibries, where one would like usage to be like
#include <vendor/sublibrary/module.h>
Then the directory structure for development might be like
bigLibrary
library1
vendor
library1 -> files like [module.h]
library2
vendor
library2
library3
vendor
library3
For example, as I recall you find that kind of directory structure for the
version 2 things in the OpenCV library.
It allows each of the library1 etc. directories to be placed just about anywhere
and worked on independently, not just as parts of bigLibrary.
But for usage it's a nuisance to set up include paths to all of library1,
library2, library3 etc. For usage you might therefore instead have
bigLibrary
include
vendor
library1 as link to impl/bigLibrary/library1/vendor/library1
library2 as link to impl/bigLibrary/library2/vendor/library2
and set up include file search path only to bigLibrary/include directory.
In Windows XP and earlier this is a bit difficult to do -- no symlinks! But
the masochistic developer can set up folders that redirect to folders. He he.
<example>
C:\test> md a
C:\test> echo This is the 'a' directory... >a\description.txt
C:\test> which linkd.exe
C:\Program Files\Windows Resource Kits\Tools\linkd.exe
C:\test> md b
C:\test> linkd b a
Link created at: b
C:\test> cd b
C:\test\b> type description.txt
This is the 'a' directory...
C:\test\b> _
</example>
Disclaimer: I haven't tested that for includes. And the idea that this might be
the reason for people using symlinks is, as I wrote, just speculation. A
possibility.
Cheers & hth.,
- Alf
--
blog at <url: http://alfps.wordpress.com>
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-02 12:58 +0000
Re: Destructors can copying objects Volker Lukas <vlukas@gmx.de> - 2011-04-02 15:29 +0200
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-03 02:59 +0000
Re: Destructors can copying objects "Balog Pal" <pasa@lib.hu> - 2011-04-03 11:32 +0200
Re: Destructors can copying objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-03 12:29 +0100
Re: Destructors can copying objects Bart van Ingen Schenau <bart@ingen.ddns.info> - 2011-04-04 13:43 +0200
Re: Destructors can copying objects Michael Doubez <michael.doubez@free.fr> - 2011-04-05 01:26 -0700
Re: Destructors can copying objects Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-04 14:03 -0700
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 21:10 +0000
Re: Destructors can copying objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-04 22:28 +0100
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 21:07 +0000
Re: Destructors can copying objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-04 22:31 +0100
Re: Destructors can copying objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-04 22:43 +0100
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 22:38 +0000
Re: Destructors can copying objects Leigh Johnston <leigh@i42.co.uk> - 2011-04-04 23:42 +0100
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 22:54 +0000
Re: Destructors can copying objects James Kanze <james.kanze@gmail.com> - 2011-04-03 10:07 -0700
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 21:14 +0000
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 21:17 +0000
Re: Destructors can copying objects LR <lruss@superlink.net> - 2011-04-05 01:52 -0400
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-03 03:08 +0000
Re: Destructors can copying objects Paavo Helde <myfirstname@osa.pri.ee> - 2011-04-03 02:11 -0500
Re: Destructors can copying objects Volker Lukas <vlukas@gmx.de> - 2011-04-03 12:02 +0200
Re: Destructors can copying objects Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-03 12:14 +0200
Re: Destructors can copying objects Roberto Waltman <usenet@rwaltman.com> - 2011-04-03 18:16 -0400
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-15 23:06 +0000
Re: Destructors can copying objects LR <lruss@superlink.net> - 2011-04-15 19:19 -0400
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-15 23:03 +0000
Re: Destructors can copying objects "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-16 01:47 +0200
Re: Destructors can copying objects Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-16 13:00 +0200
Re: Destructors can copying objects "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-16 15:57 +0200
Re: Destructors can copying objects LR <lruss@superlink.net> - 2011-04-02 09:51 -0400
Re: Destructors can copying objects Yannick Tremblay <yannick@tremnblay.co.uk> - 2011-04-04 12:56 +0000
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-04 21:05 +0000
Re: Destructors can copying objects Paavo Helde <myfirstname@osa.pri.ee> - 2011-04-04 21:56 -0500
Re: Destructors can copying objects Yannick Tremblay <yannick@tremnblay.co.uk> - 2011-04-05 11:36 +0000
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-05 15:40 +0000
Re: Destructors can copying objects Sana <sanatakos@gmail.com> - 2011-04-05 10:11 -0700
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-05 20:28 +0000
Re: Destructors can copying objects Yannick Tremblay <yannick@tremnblay.co.uk> - 2011-04-06 11:12 +0000
Re: Destructors can copying objects drew@furrfu.invalid (Drew Lawson) - 2011-04-05 13:02 +0000
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-05 15:51 +0000
Re: Destructors can copying objects drew@furrfu.invalid (Drew Lawson) - 2011-04-05 17:47 +0000
Re: Destructors can copying objects Ruben Safir <ruben@mrbrklyn.com> - 2011-04-05 20:25 +0000
Re: Destructors can copying objects drew@furrfu.invalid (Drew Lawson) - 2011-04-05 20:37 +0000
csiph-web