[boost] Re: boost/detail/iterator.hpp update

2003-08-28 Thread Pavel Vozenilek
- Original Message - From: David Abrahams [EMAIL PROTECTED] Newsgroups: gmane.comp.lib.boost.devel Sent: Thursday, August 28, 2003 9:05 PM Subject: Re: boost/detail/iterator.hpp update ... Anyone got a brilliant way to cause vc7 to print the error message? #pragma message ( some text

[boost] Re: memcpy_copyable and memcpy_moveable type traits

2003-08-26 Thread Pavel Vozenilek
Edward Diener [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Extremely dangerous and error prone. I can't even imagine a non-POD type where flagging it for memcpy_copyable and memcpy_moveable can be right. Can you give an example ? It is error prone but many other constructs are

[boost] Re: Re: memcpy_copyable and memcpy_moveable type traits

2003-08-26 Thread Pavel Vozenilek
John Maddock [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] He needs to take a look at the has_trivial_* traits: has_trivial_assign is roughly equivalent to memcpy_copyable I guess there is no equivalent to memcpy_moveable: but it looks rather dangerous, It looks dangerous but

[boost] Re: memcpy_copyable and memcpy_moveable type traits

2003-08-26 Thread Pavel Vozenilek
Edward Diener [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... But even for a POD type such as this, copying would lead to errors if the char * data were dynamically allocated since a double delete would probably be done. Containers aware of memcpy_moveable can detect this flag

[boost] Re: memcpy_copyable and memcpy_moveable type traits

2003-08-26 Thread Pavel Vozenilek
Edward Diener [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... But even for a POD type such as this, copying would lead to errors if the char * data were dynamically allocated since a double delete would probably be done. Containers aware of memcpy_moveable can detect this flag

[boost] Re: memcpy_copyable and memcpy_moveable type traits

2003-08-25 Thread Pavel Vozenilek
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Pavel Vozenilek [EMAIL PROTECTED] writes: Type traits library may be extended with: - memcpy_copyable and - memcpy_moveable see boost::is_POD. memcpy_moveable may be useful for non-POD types, like some pimpls

[boost] Re: memcpy_copyable and memcpy_moveable type traits

2003-08-25 Thread Pavel Vozenilek
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... I don't believe you can use memcpy to move any non-POD types portably, i.e. without special knowledge of the compiler. Thats my point - you may flag some types as safely moveable and then use this knowledge in

[boost] Re: filesystem feature request

2003-08-09 Thread Pavel Vozenilek
From: David Abrahams [EMAIL PROTECTED] I need the ability to do interprocess synchronization through file locking, c.f. Java.File.createNewFile and Java.File.deleteOnExit: ... On Posix, the first one would be done with open(..., O_CREAT | O_EXCL) and the second, I suppose, would be done

[boost] Re: Re: Re: Re: GUI/GDI template library

2003-08-03 Thread Pavel Vozenilek
Terje Slettebø [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Make no mistake - this is a lot of work, too. However, it may be much less work than creating one from scratch. What do we want - vaporware of a Boost GUI library coming real soon now, perhaps not appearing for many

[boost] Re: circular_buffer update

2003-07-31 Thread Pavel Vozenilek
Hello Jano, Jan Gaspar [EMAIL PROTECTED] wrote The updated circular_buffer implementation can be found at the common place http://groups.yahoo.com/group/boost/files/circular_buffer.zip I looked briefly over the code: 1. IMO the macro based exception handling isn't needed, it is better

[boost] Re: circular_buffer and unused space overhead

2003-07-29 Thread Pavel Vozenilek
In relation to the previous discussion I thought an alternative container may be a circular_deque that could have the kind of flexibility with resizing that also sounds desirable. Does a circular_deque sound like the right solution to your particular application, rather than a vector-like

[boost] Re: circular_buffer and unused space overhead

2003-07-28 Thread Pavel Vozenilek
Nigel Stewart [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Wouldn't it be better to use smaller internal memory block initially and resize it only when demand goes up? That's a good point, but it certainly complicates both the interface and the semantics of the container.

[boost] Re: circular_buffer and unused space overhead

2003-07-28 Thread Pavel Vozenilek
Nigel Stewart [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] IMO the resize/shrink cannot be added via adaptor (unless it is very complex one). An adaptor that wraps push() and insert() would be considerd too heavy-weight? I think it is pretty heavyweight, but maybe there's

[boost] Re: Proposal: BOOST_NO_TEMPLATED_STREAMS config macroandhelpers

2003-07-26 Thread Pavel Vozenilek
Gennaro Prota [EMAIL PROTECTED] wrote ... I had this problem with dynamic_bitset and, after discussing it with Phil Edwards (who is one of the maintainers of libstdc++), I came up with the macro that is currently in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost-sandbox/boost-sandbox/b

[boost] circular_buffer: minor feature request

2003-07-22 Thread Pavel Vozenilek
Would it be possible to add helper function 'flatten()' into circular_buffer? After invocation, user would be sure of: buff[0] buff[1] ... buff[n] In other words, user will be able to treat circular_buffer content as continuous array of values in this moment. It is not earth shaking

[boost] Re: Re: Re: Formal Review Request: circular_buffer [long]

2003-07-22 Thread Pavel Vozenilek
Hello Jano, Jan Gaspar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 3. This fragment fails: struct Test {} circular_bufferTest a(2); a.push_back(Test()); a.push_back(a[0]); I don't understand this. IMHO there will be 2 copies of Test(). Nothing should be

[boost] Re: current_function.hpp extension

2003-07-18 Thread Pavel Vozenilek
Peter Dimov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... There is currently no BOOST_HAS_CURRENT_FUNCTION since the idealistic goal has been to cover all widely used compilers one day, ... On the other hand, perhaps you have a use case that clearly demonstrates the need for

[boost] [thread] bugfix + possible deadlock

2003-07-03 Thread Pavel Vozenilek
Boost 1.30, Windows. libs/thread/src/once.cpp, function call_once(), CreateMutex() should be replaced with CreateMutexA() in one place. Looking into the code, I have question: if the 'called once' function throws, it leaves (under Win32) opened mutex and this can deadlock the app (if there are

[boost] Re: BOOST_STATIC_ASSERT - a little better

2003-06-20 Thread Pavel Vozenilek
John Torjo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I was just thinking (actually, I needed this, while doing some coding), that STATIC_ASSERT could get a little of the SMART_ASSERT flavour. What am I talking about? In case a STATIC_ASSERT fails, how about dumping

[boost] Re: BOOST_STATIC_WARNING ?

2003-06-15 Thread Pavel Vozenilek
Robert Ramey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] H - I never imagined that something like this would be so problematic. For now with my VC 7.0 compiler I can use the following and it gives me almost exactly what I need. The warning message points exactly to the

[boost] Re: Any interest in a member function pointer - functionpointerconverter? (a la boost::function)

2003-06-06 Thread Pavel Vozenilek
Terje Slettebø [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] int main() { function_ptrint (A*, int), A::a_member fn; // The rest the same A a; int r=fn(a, 3); // sets r to 9 } Is it similar (in principle) to

[boost] Re: Re: Better Intel-Win32 support

2003-06-05 Thread Pavel Vozenilek
John Maddock [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That will certainly work, but you shouldn't have to do that since the compiler itself defines _WCHAR_T_DEFINED. Since I made the fix earlier this afternoon I am able to compile some non-boost code correctly which had

[boost] [lexical_cast] performance related feature

2003-06-05 Thread Pavel Vozenilek
lexical_cast constructs and destroys std::stringstream (including dynamic memory allocation/free.) each time a conversion is done. Maybe specialised version of lexical_cast can be developed which takes external, existing stringstream instance as template parameter and reuses it. Very rough

[boost] Re: Better Intel-Win32 support

2003-06-02 Thread Pavel Vozenilek
Beman Dawes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'll try to trace where BOOST_NO_INTRINSIC_WCHAR_T is being set. I'm not so worried about ADL, at least with VC++ 7.1. You may look on test table http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864. (Warning : when

[boost] Re: Configuration for Intel compiler

2003-05-11 Thread Pavel Vozenilek
Guillaume Melquiond [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I found a bug in the interval library. but when I corrected it, I stumbled over another problem: this bug was ironically what allowed the library to be correctly compiled with my version of the compiler (Intel

[boost] Re: quantity.hpp uploaded into files section

2003-04-27 Thread Pavel Vozenilek
Terje Slettebø [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If one were to implement currency conversion, how might that be done, in general? Does one need to store the conversion rates between any two currencies (giving an N^2 size table), or might it be possible to convert any

[boost] Re: [filesystem] new functions proposals

2003-04-27 Thread Pavel Vozenilek
Trevor Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So it sounds to me like the :blat is *not* part of the extension. It sounds like the NT file name is made up of three parts: name, extension and stream. In which case I think it is fine to have functions extension() and

[boost] Re: better assertion technique

2003-04-23 Thread Pavel Vozenilek
John Torjo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] assert( (i j) || (i == 0) || (j == 1) ); would change into SMART_ASSERT( (v_(i) v_(j)) || (i == 0) || (j == 1) ); The output of the above (in case the assertion fails) can look like: Assertion failed: '(v_(i) v_(j))

[boost] Re: [filesystem] new functions proposals

2003-04-17 Thread Pavel Vozenilek
Jason House [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] :blat ??? 1. I have no clue what that would mean 2. Is there any handling of :blat in any way shape or form in the file system stuff? I don't remember seeing any description of that case... It means alternate stream of

[boost] Quantity library: any interest?

2003-04-12 Thread Pavel Vozenilek
I wrote Quantity library some time ago and wonder whether it may get added into Conversion library. If anyone gets interested I will Boostify and submit it. Quantity library is used to get safe conversions between different physical units (like between Celsius and Farhernheit degrees). Instead

[boost] Re: [optional] two problems with BCB 6 and 1.30b

2003-03-24 Thread Pavel Vozenilek
- Original Message - From: Fernando Cacciola [EMAIL PROTECTED] Following snippet of code fails: - #include boost/optional.hpp #include utility void foo(const boost::optionalstd::pairunsigned, unsigned aux = boost::optionalstd::pairunsigned, unsigned ())

[boost] Re: [date_time] enabling microsec_clock under C++Builder

2003-03-24 Thread Pavel Vozenilek
Alisdair Meredith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Russell Hind wrote: WinAPI Note: we can get a higher resolution using the QueryPerformanceCounter API (and QueryPerformanceFrequency if resolution info is required) It is (was) not completely reliable: see Q274323

[boost] [optional] two problems with BCB 6 and 1.30b

2003-03-19 Thread Pavel Vozenilek
I use Borland C++ Builder 6, update 4, STLPort 4.5.1 (provided by Borland) and Boost is 1.30.0beta1. Following snippet of code fails: - #include boost/optional.hpp #include utility void foo(const boost::optionalstd::pairunsigned, unsigned aux =

[boost] Re: shifted_ptr w/ lock mechanism

2003-01-29 Thread Pavel Vozenilek
David Abrahams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Peter Dimov [EMAIL PROTECTED] writes: From: David Abrahams [EMAIL PROTECTED] Philippe A. Bouchard [EMAIL PROTECTED] writes: Lock mechanism was added to shifted_ptr:

[boost] Re: Re: Re: undo library

2003-01-24 Thread Pavel Vozenilek
Ihsan Ali Al Darhi [EMAIL PROTECTED] wrote in message 01d001c2c2ba$6af14ea0$73c721d4@h8p7o2">news:01d001c2c2ba$6af14ea0$73c721d4@h8p7o2... Can I use this library to implement multiple undo/redo in GUI applications under Windows? For example in a word processor. Undo/redo is generic mechanism

[boost] Re: is_abstract_baseT ?

2003-01-24 Thread Pavel Vozenilek
Robert Ramey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there such a thing as is_abstract_baseT similar to is_polymorphicT ? Is such a thing possible? I could use it but have been unable to figrure out how to do it. Rani Sharoni wrote

[boost] Re: Re: undo library

2003-01-23 Thread Pavel Vozenilek
Andrei Alexandrescu [EMAIL PROTECTED] wrote in message b0pu01$bqd$[EMAIL PROTECTED]">news:b0pu01$bqd$[EMAIL PROTECTED]... Al Stevens has an article in a past DDJ about a generic undo/redo library, can anyone dig it out? I recall it was interesting. Can be purchased here:

[boost] is_abstract_class type trait

2003-01-06 Thread Pavel Vozenilek
Rani Sharoni posted one possible implementation on http://tinyurl.com/459q (c.l.c++.m, 2002-07-11, topic 'is_abstract_class implementation!'). The implementation depends on border-case C++ feature (more in Rani's text). I compiled it sucessfully with Comeau online compiler. It may be

[boost] Re: statistics

2002-12-03 Thread Pavel Vozenilek
Beman Dawes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [snip] If I understand you correctly, those are counts of the number of files. Yes. The visible tendency is to provide all formats: zip/gz/bzip2. Previous releases typically come with only zip/gz and

[boost] statistics

2002-12-02 Thread Pavel Vozenilek
Beman Dawes [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 03:05 PM 11/29/2002, Pavel Vozenilek wrote: Bandwith and time of those with dialup can be saved by compressing Boost release by BZIP2 compressor (http://sources.redhat.com/bzip2/).

[boost] Boost release compressed by bzip2

2002-11-29 Thread Pavel Vozenilek
Bandwith and time of those with dialup can be saved by compressing Boost release by BZIP2 compressor (http://sources.redhat.com/bzip2/). For example boost_1_29_0.tar.gz has size 5 272 kB, tared and compressed by bzip2 size is 4 282 kB (down to 81%). Boost size will grow (Spirit lib has over