Re: [boost] Re: pick_of() proposal

2003-02-11 Thread Jon Kalb
On 2003-02-11 8:47 PM, "Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote: > Jon Kalb wrote: > > [...] > >> If a user attempts to use this on a non-polymorphic object, will they >> get a compile time error or run-time error? > > No compile-time error, but a run-time error may occur if multiple >

Re: [boost] Re: BGL bfs and dfs

2003-02-11 Thread Vladimir Prus
vladimir josef sykora wrote: > > The docs state that in quite vague terms and I don't remember where. I've > > asked Jeremy about that and he agreed more documentation is needed, but > > I'm > > > not sure what those docs should say :-( > > If the algorithms' implementations receive color maps by

[boost] Help with policy_ptr

2003-02-11 Thread David B. Held
This is a request for anyone who is willing and able to help finish writing the tests for policy_ptr in the sandbox. I'm afraid that I just don't have the time to dedicate to this library to come anywhere close to the April meeting of the LWG (or whoever it is that's meeting). While most of the b

[boost] "peak_of()" proposal

2003-02-11 Thread Philippe A. Bouchard
I made some stupid mispelling about the name, I just woke up to correct it: http://groups.yahoo.com/group/boost/files/shifted_ptr/peak_of.hpp Sorry about it, Philippe A. Bouchard ___ Unsubscribe & other changes: http://lists.boost.org/mailman/lis

[boost] Re: Re: Reflection system in C++ using templates

2003-02-11 Thread Lin Xu
However, wouldn't writing MemberFun or even: MemberFun instead of Function::MemberFun be a lot simpler? Yeah, I guess it would. The syntax I had before was limited by my lack of knowledge about how to extract the arguments and return type from a classtype. But I

[boost] Re: pick_of() proposal

2003-02-11 Thread Philippe A. Bouchard
Jon Kalb wrote: [...] > If a user attempts to use this on a non-polymorphic object, will they > get a compile time error or run-time error? No compile-time error, but a run-time error may occur if multiple inheritance is used. There is basically nothing we can do in this situation: class A { c

Re: [boost] pick_of() proposal

2003-02-11 Thread Jon Kalb
On 2003-02-11 7:13 PM, "Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote: > I would like to propose the following helper that returns the address of > some polymorphic object's leftmost parent. Useful when you want to find the > starting address of an allocated block given any other derived parent

[boost] pick_of() proposal

2003-02-11 Thread Philippe A. Bouchard
I would like to propose the following helper that returns the address of some polymorphic object's leftmost parent. Useful when you want to find the starting address of an allocated block given any other derived parent: http://groups.yahoo.com/group/boost/files/shifted_ptr/pick_of.hpp Philippe

Re: [boost] Re: [test] metrowerks linking errors

2003-02-11 Thread Paul Hamilton
David Abrahams <[EMAIL PROTECTED]> writes: ehab samir aziz <[EMAIL PROTECTED]> writes: I did not find any executable file called bjam to run it !! Please see the tools/build/index.html page in your Boost distribution. Definitely read ALL of the documentation. after building bjam and jam,

[boost] padding_of<> proposal (& add_padding<>)

2003-02-11 Thread Philippe A. Bouchard
Here are two little classes that could be useful to create aligned types on-the-fly: http://groups.yahoo.com/group/boost/files/shifted_ptr/padding_of.hpp http://groups.yahoo.com/group/boost/files/shifted_ptr/add_padding.hpp Philippe A. Bouchard ___

[boost] Re: Linker trouble when building regex lib

2003-02-11 Thread Edward Diener
"Mark Davenport" <[EMAIL PROTECTED]> wrote in message 01c2d1a1$7fdee890$4198fc3e@brio">news:01c2d1a1$7fdee890$4198fc3e@brio... > Hello boost list > > I'm newish to C++ and very new to boost. > > I've just tried to build the object library for regex > in Borland Builder 5 Pro on Windows XP.

RE: [boost] MPL's gcc ADL fixes

2003-02-11 Thread Aleksey Gurtovoy
vladimir josef sykora wrote: > Hello Aleksey, Hi Vladimir, > Encapsulating algorithms with a _new_ namespace, and later injecting > it into the ::mpl via 'using', solves fine gcc's ADL conflicts. Could > you apply BOOST_MPL_AUX_AGLORITHM_NAMESPACE patch to other algorithms? Sure, will do for t

Re: [boost] Any interest in a stats class

2003-02-11 Thread Neal D. Becker
Yes, I use a simple 2nd order stats class all the time. There is a scalar version: template class Stat { And for complex: template class Stat< std::complex > { On Tuesday 11 February 2003 11:19 am, Jeff Garland wrote: > Scott K wrote: > > Hi all, > > I have a small family of statistics classes

[boost] Re: Any interest in a stats class

2003-02-11 Thread Scott Kirkwood
Well what do you know... The "order_2_accumulator" class on that page looks just like my "stats" class. I threw in min and max and have more functions, but otherwise it's the same. -Scott Jeff Garland wrote: ... Specifically concerning statistics see: http://www.crystalclearsoftware.com/cgi-bi

Request for Config Macro( was RE: [boost] Re: [test] "unix" identification )

2003-02-11 Thread Rozental, Gennadiy
So, Let introduce one. I need something for coming release. Gennadiy. > > Any suggestions? > > Looks like testing for _POSIX2_VERSION would be another > option - BTW I'm > tempted to suggest that we add a config macro and tests for > this, that way > the configure script will pick this up: BOO

Re: [boost] Re: Weak ref. via atomicity (RE: Smart pointers:...)

2003-02-11 Thread Pavel Vasiliev
Alexander Terekhov wrote: > Pavel Vasiliev wrote: > [...] >> Thread A, in release_strong: >>atomic_decrement(&strong_count) == 0, >>enter strong_refs_lost(), >>lock > ACK. >> Thread B, in acquire_strong_from_weak: > NAK. > Thread B, in release_weak: > a

[boost] Re: Weak ref. via atomicity (RE: Smart pointers:...)

2003-02-11 Thread Alexander Terekhov
Pavel Vasiliev wrote: [...] > Thread A, in release_strong: >atomic_decrement(&strong_count) == 0, >enter strong_refs_lost(), >lock ACK. > Thread B, in acquire_strong_from_weak: NAK. Thread B, in release_weak: atomic_decrement(&weak_count) == 0, > Thread

RE: [boost] Any interest in a stats class

2003-02-11 Thread Jeff Garland
Scott K wrote: > Hi all, > I have a small family of statistics classes which I have used from time > to time. The one I use most often is simply called stats. > Here's an example of it's use: > ...details snipped... I'm sure there are folks interested in statistical (and other) functions. I've d

Re: [boost] Re: Weak ref. via atomicity (RE: Smart pointers:...)

2003-02-11 Thread Pavel Vasiliev
Alexander Terekhov wrote: [...] > void release_strong() { > int status = pthread_refcount_decrement(&strong_count); > if (PTHREAD_REFCOUNT_DROPPED_TO_ZERO == status) { > destruct_object(); > release_weak(); > } > } > bool acquire_strong_from_weak() { > int stat

[boost] Re: Re: padding_of<> proposal

2003-02-11 Thread Philippe A. Bouchard
David Abrahams wrote: [...] > OK, so what you really want is alignment_of. Ah, there it is. Unions are great for this. > By "STL" I presume you mean your particular STL implementation. No I meant SGI's Standard Template Library (__STL_DATA_ALIGNMENT in pthread_alloc). [...] >> Ex.: >> >> -

[boost] Re: Request: BOOST_ENABLE_LONG_LONG

2003-02-11 Thread Gennaro Prota
On Tue, 11 Feb 2003 08:09:19 -0500, David Abrahams <[EMAIL PROTECTED]> wrote: >Gennaro Prota <[EMAIL PROTECTED]> writes: >> Could we subordinate BOOST_HAS_LONG_LONG to >> defined(BOOST_ENABLE_LONG_LONG)? > >Even if we're willing to break user code and tell them they have to >define that macro exp

[boost] Any interest in a stats class

2003-02-11 Thread Scott Kirkwood
Hi all, I have a small family of statistics classes which I have used from time to time. The one I use most often is simply called stats. Here's an example of it's use: ... stats myStats; for (int i = 0; i < 100; ++i) { myStats.add(i); } cout << "Average: " << myStats.getAverage(

Re: [boost] Re: padding_of<> proposal

2003-02-11 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: >> >>> Hi again, >>> >>> I am doing some helper class that will pad the space after a >>> given type until it reaches a machine word boundary. This word >>> boundar

[boost] Re: padding_of<> proposal

2003-02-11 Thread Philippe A. Bouchard
David Abrahams wrote: [...] > Even if what you wrote made sense, which I'm not sure it does, > > [to me at least - how can a word boundary be a number (max over > all types T of alignment_of - sizeof(char)), rather than an > address? It is the result of arithmetics between sizeo

[boost] Re: padding_of<> proposal

2003-02-11 Thread Philippe A. Bouchard
David Abrahams wrote: > "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > >> Hi again, >> >> I am doing some helper class that will pad the space after a >> given type until it reaches a machine word boundary. This word >> boundary would be the maximum of (alignment_of::value - >> sizeof(ch

Re[2]: [boost] Weak ref. via atomicity (RE: Smart pointers:...)

2003-02-11 Thread Pavel Vasiliev
Peter Dimov wrote: > Pavel Vasiliev wrote: >> May be the following code answers the challenge? :-). > Interesting... > [...] >> void weak_ref_control_block::release_strong() >> { >> if(atomic_decrement(&strong_count) == 0) >> strong_refs_lost(); >> } >> bool weak_ref_control_block

Re: [boost] Re: [test] metrowerks linking errors

2003-02-11 Thread David Abrahams
ehab samir aziz <[EMAIL PROTECTED]> writes: > I did not find any executable file called bjam to run > it !! Please see the tools/build/index.html page in your Boost distribution. HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com ___ U

[boost] Re: BGL bfs and dfs

2003-02-11 Thread vladimir josef sykora
> > The point is that I have my own internal properties for vertices and edges, > > and I had to construct new color maps to pass to the algorithms (providing > > get() and put()). Does this mean a that shallow copy is a requirement for > > the concept of property map? > > The docs state that in qu

[boost] Linker trouble when building regex lib

2003-02-11 Thread Mark Davenport
Hello boost list I'm newish to C++ and very new to boost. I've just tried to build the object library for regex in Borland Builder 5 Pro on Windows XP. I ran the make on bcb5, got no errors at that stage, but when I try to compile my app within the Builder IDE I get a fatal linker error: Cannot

Re: [boost] Re: [test] metrowerks linking errors

2003-02-11 Thread ehab samir aziz
I did not find any executable file called bjam to run it !! --- David Abrahams <[EMAIL PROTECTED]> wrote: > ehab samir aziz <[EMAIL PROTECTED]> writes: > > > I am running C++ ver 3 . How can I know exactly > the > > libraries linked ? > > You can examine the command lines generated by bjam > w

[boost] Re: Weak ref. via atomicity (RE: Smart pointers:...)

2003-02-11 Thread Alexander Terekhov
Peter Dimov wrote: > > Alexander Terekhov wrote: > [...] > > bool acquire_strong_from_weak() { > > int status = pthread_refcount_enroll_one(&strong_count); // > [...] > > Or am I just missing and/or misunderstanding something? > > You are missing the fact that nobody (even Google) has a cl

Re: [boost] Request: BOOST_ENABLE_LONG_LONG

2003-02-11 Thread David Abrahams
Gennaro Prota <[EMAIL PROTECTED]> writes: > As I've asked in a recent post, I would like to have boost not using > non-standard features (e.g. long long), unless they are explicitly > requested by the user. The reason, besides general boost philosophy > considerations, is that, with some compilers

[boost] Re: Borland specific defects : new config defines?

2003-02-11 Thread Gennaro Prota
On Tue, 04 Feb 2003 00:02:30 +, Alisdair Meredith <[EMAIL PROTECTED]> wrote: >The two defects are: >The various std::isdigit, islower, isalnum etc. convenience functions >will not compile. Please could you post a concrete example? [...] >Second problem is with the STLport implementation of t

Re: [boost] padding_of<> proposal

2003-02-11 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > Hi again, > > I am doing some helper class that will pad the space after a given type > until it reaches a machine word boundary. This word boundary would be the > maximum of (alignment_of::value - sizeof(char)) where T is any > 'typename',

[boost] Re: Request: BOOST_ENABLE_LONG_LONG

2003-02-11 Thread Gennaro Prota
On Tue, 11 Feb 2003 11:36:56 -, "John Maddock" <[EMAIL PROTECTED]> wrote: >> Could we subordinate BOOST_HAS_LONG_LONG to >> defined(BOOST_ENABLE_LONG_LONG)? > >I would rather that BOOST_HAS_LONG_LONG was just not defined in the first >place when EDG is in strict mode - any ideas? When Intel?

[boost] Re: Request for static_constant.hpp

2003-02-11 Thread Gennaro Prota
On Tue, 11 Feb 2003 11:40:20 -, "John Maddock" <[EMAIL PROTECTED]> wrote: >> Well, the title says it all :-) I would like to have a separate source >> file for the ubiquitous BOOST_STATIC_CONSTANT. I have several files >> that use BOOST_STATIC_CONSTANT but no real config macro. For those >> on

Re: [boost] Re: Borland specific defects : new config defines?

2003-02-11 Thread John Maddock
> We could boilerplate each affected standard header, and whenever that > header is included add > #if defined( BOOST_WORKAROUND_BROKEN_BORLAND_STL_NAMESPACE ) > #include "boost/[patches]/[broken_header]" > #endif > > Of course this moves tbe problem onto the library-maintainer, but avoids > the h

Re: [boost] Request: BOOST_ENABLE_LONG_LONG

2003-02-11 Thread John Maddock
> Could we subordinate BOOST_HAS_LONG_LONG to > defined(BOOST_ENABLE_LONG_LONG)? I would rather that BOOST_HAS_LONG_LONG was just not defined in the first place when EDG is in strict mode - any ideas? John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm _

Re: [boost] [Boost.Config] Request for new config macro

2003-02-11 Thread John Maddock
> I would like to propose the addition of a new config macro to Boost.Config: > BOOST_USING_OLD_STYLE_IOSTREAMS > > A (possibly incomplete) implementation is: > #if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__STL_USE_NEW_IOSTREAMS) > || defined(_MSC_VER) && (_MSC_VER < 1300) > #define

Re: [boost] Request for static_constant.hpp

2003-02-11 Thread John Maddock
> Well, the title says it all :-) I would like to have a separate source > file for the ubiquitous BOOST_STATIC_CONSTANT. I have several files > that use BOOST_STATIC_CONSTANT but no real config macro. For those > ones, I currently have something like > > #include "boost/config.hpp" // for BOOST_ST

Re: [boost] Re: [test] "unix" identification

2003-02-11 Thread John Maddock
> Any suggestions? Looks like testing for _POSIX2_VERSION would be another option - BTW I'm tempted to suggest that we add a config macro and tests for this, that way the configure script will pick this up: BOOST_HAS_SIGACTION maybe? John Maddock http://ourworld.compuserve.com/homepages/john_mad

Re: [boost] date_time release mode errors

2003-02-11 Thread John Maddock
> This (and all the rest of the failures) are an indication that the library > hasn't been built correctly or isn't being linked because it is complaining > about symbols built into libboost_date_time. Maybe, but all I did was invoke the bjam to build everything - and BTW these linker errors do no

[boost] Re: Request for non_copyable.hpp

2003-02-11 Thread Gennaro Prota
On Mon, 10 Feb 2003 16:32:11 -0600, Aleksey Gurtovoy <[EMAIL PROTECTED]> wrote: > I proposed to split "utility.hpp" header a >long time ago, and there was a general agreement, but it was postponed until >the release is out, and I never got to doing it after that - even although >Beman posted a rem

[boost] Re: BGL bfs and dfs

2003-02-11 Thread Vladimir Prus
vladimir josef sykora wrote: Hello vladimir, "Vladimir Prus" <[EMAIL PROTECTED]> wrote in message b2aipc$6us$[EMAIL PROTECTED]">news:b2aipc$6us$[EMAIL PROTECTED]... Hi vladimir, DF visit and undirected-DFV implementations (depth_first_visit_impl and undir_dfv_impl) functions receive ColorMaps

[boost] Re: BGL bfs and dfs

2003-02-11 Thread vladimir josef sykora
Hello vladimir, "Vladimir Prus" <[EMAIL PROTECTED]> wrote in message b2aipc$6us$[EMAIL PROTECTED]">news:b2aipc$6us$[EMAIL PROTECTED]... > Hi vladimir, > > DF visit and undirected-DFV implementations (depth_first_visit_impl > > and undir_dfv_impl) functions receive ColorMaps by value, consequently

[boost] MPL's gcc ADL fixes

2003-02-11 Thread vladimir josef sykora
Hello Aleksey, Encapsulating algorithms with a _new_ namespace, and later injecting it into the ::mpl via 'using', solves fine gcc's ADL conflicts. Could you apply BOOST_MPL_AUX_AGLORITHM_NAMESPACE patch to other algorithms? Thanks, ^ ^ -- vladimir josef sykora morphochem

[boost] Re: BGL bfs and dfs

2003-02-11 Thread Vladimir Prus
Hi vladimir, DF visit and undirected-DFV implementations (depth_first_visit_impl and undir_dfv_impl) functions receive ColorMaps by value, consequently the main trunk of the algorithm loose the graph coloring that these functions have performed. Am I missing something here? I think so. Property

[boost] BGL bfs and dfs

2003-02-11 Thread vladimir josef sykora
DF visit and undirected-DFV implementations (depth_first_visit_impl and undir_dfv_impl) functions receive ColorMaps by value, consequently the main trunk of the algorithm loose the graph coloring that these functions have performed. Am I missing something here? Also, in BFS and DFS algorithms, why

RE: [boost] Re: Re: Minimal test tool - very minor comments & spellchecking documentation

2003-02-11 Thread Paul A. Bristow
I attach extracts from the MSVC 7.0 warnings and documentation. I don't think this is very important, but documenting requirements may be helpful. As for spell checking, MS FrontPage astonishingly doesn't appear to include a spelling checker but I now find that after preparing each html file, one