[boost] review of optional library

2002-12-12 Thread Dave Gomboc
At this point in time, I vote to reject the library. My vote is based upon a review of the interface and implementation in optional.hpp of the zip file I downloaded from the link posted by Fernando on Dec. 12, and following the discussion via the mailing list digests. I will qualify my vote by

[boost] (corrected) review of optional library

2002-12-12 Thread Dave Gomboc
Adjusted at five points; please ignore the previous one. -- Forwarded message -- At this point in time, I vote to reject the library. My vote is based upon a review of the interface and implementation in optional.hpp of the zip file I downloaded from the link posted by Fernando

[boost] Re: Fix for some Interval library tests

2003-02-08 Thread Dave Gomboc
I suggest adding another boost defect: BOOST_BROKEN_ADL (or similar) How about BOOST_LIBRARY_IMPL_VULNERABLE_TO_ADL? It's not that the compiler's ADL implementation is broken, it's that the library implementation isn't protected against ADL lookups where it needs to be. Dave

Re: [boost] Re: Patch for function/function_base.hpp

2003-02-13 Thread Dave Gomboc
Ah, that's the reason. But given my recent discomfort about unmaintainable code, look at it again: # if BOOST_WORKAROUND(__HP_aCC, = 33900) templatebool cond, typename T struct enable_if; # else templatebool, typename T struct enable_if; # endif Does this really

[boost] Re: is_class

2003-02-16 Thread Dave Gomboc
See also the discussion about a general coding guideline to always provide a name for template parameters. Here, the maintainer already did the right thing when he received the patch. If the maintainer hid the compiler brokenness completely, then they did the wrong thing. If they didn't,

[boost] Re: is_class

2003-02-17 Thread Dave Gomboc
No, I would prefer #if BOOST_WORKAROUND(__HP_aCC, =33900) || BOOST_WORKAROUND(__VisualAge, =12345) template bool cond, typename T struct enable_if; #else template bool, typename struct enable_if; #endif I already explained the reason: C++ compiler vendors use Boost

[boost] resource manager naming

2003-02-25 Thread Dave Gomboc
I would be searching namely for smart_ptr. I know that smart pointer is the name for the resource management idiom. But those that don't would look for resource_manager or resource_mgr (and might even find res_mgr). The smart_ prefix is quite useless in this context, there isn't an old

[boost] Re: resource manager naming

2003-02-27 Thread Dave Gomboc
So then reverse resource_manager and get managed_resource, or just managed. Why not just resource? Management is implied anyway; that's the reason for the existence of the class. *laugh* I was thinking exactly the opposite. To me, the resource itself is clear from the template parameter

[boost] Re: resource manager naming

2003-03-01 Thread Dave Gomboc
*laugh* I was thinking exactly the opposite. To me, the resource itself is clear from the template parameter -- it's the management that needs to be indicated. +1 for managed. What template parameter? That's not a part of the name. Template parameters, just like function

[boost] will lexical_cast improvements be in 1.30.0?

2003-03-03 Thread Dave Gomboc
of emitting the bad lexical cast error. Dave -- Dave Gomboc M.Sc. Student1-41 Athabasca Hall Department of Computing Science Edmonton, Alberta, University of AlbertaCanada T6G 2E5

[boost] lexical_cast(Was: FYI)

2003-03-05 Thread Dave Gomboc
Hi, Yes, the whitespace problem is fixed in the forthcoming version. What's forthcoming version? Is this forthcoming Boost release? Then I don't see any changes to lexical_cast.hpp at all. Or lexical_cast update will be committed later? Yeah, I was aware that work had been done on it,

[boost] lexical_cast and boost-1.30

2003-03-13 Thread Dave Gomboc
Here is the current list: It looks to me like we should hold the lexical_cast changes until the next release. There are really two issues IIUC - some wide-character support problems and VC++ 6.0 support. While the wide-character problems might be possible to resolve quickly, VC++ 6.0

[boost] tracing / logging library

2003-03-18 Thread Dave Gomboc
Just curious if anyone's doing something along these lines. A quick google search on boost turned up only Boost.Test, which (I think?) is something quite different. Dave ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

[boost] spirit documentation bug

2003-03-20 Thread Dave Gomboc
Page Subrules: ... yields a complex type. Thus, while it is easy to write: int r = i | j k; // where i, j, and k are ints Forget rules for a second. Expression templates... The sentence seems to be cut off in the middle. I'm not sure what the repair should be. Dave

[boost] spirit documentation bug

2003-03-20 Thread Dave Gomboc
Section Portability 8. Intel 7.0VisualAge C++ 5.02 should be split into two lines. Dave ___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

[boost] bad_lexical_cast

2003-03-23 Thread Dave Gomboc
Yes. Since type_info objects can't be copied, one might instead store pointers or references to them. Pointers would be better because, for better or for worse (mostly for worse), standard exceptions support assignment as part of their interface. Why should boost exception classes behave

[boost] Re: bad_lexical_cast

2003-03-23 Thread Dave Gomboc
Since you advocate elsewhere that exception classes be derived from std::exception, the answer is because otherwise LSP would be violated. You can't access the derived class' assignment operator through a pointer/reference to a polymorphic base, so that point is moot. Well, you're the

[boost] Re: boost::optional feature request.

2003-03-25 Thread Dave Gomboc
It would be nice if boost::optionalT had operator defined whenever operator was defined for T. This would allow us to use optionalT as the key of an associative container. I suggest the following semantics: bool operator(optionalT const x, optionalT const y); Returns: If y is

[boost] spirit 1.6 parsing question

2003-03-26 Thread Dave Gomboc
When I define rules x, y, and z such that x = ch_p('a'); y = ch_p('a'); z = !x y; it appears to operate the same as if z were defined to be z = (ch_p('a') | epsilon_p) 'a'; which accepts aa, but rejects a. On the other hand, if I define z as z = (epsilon_p | ch_p('a'))

[boost] full cyclic_buffer

2003-06-09 Thread Dave Gomboc
Instead of dropping elements when the buffer is full, we might also consider waiting or throwing a failure. I consider dropping elements to be surprising behaviour. If there's no policy stuff, then either decide that it will throw, or leave what happens to be implementation-defined. Dave

[boost] boost::regex opeartor+= bug report

2003-06-24 Thread Dave Gomboc
The file boost/regex/v4/perl_matcher_non_recursive.hpp includes statements such as end += std::min((unsigned)re_detail::distance(position, last), desired); operator+= is appropriate for random-access iterators, but not for merely bidirectional iterators such as std::listchar::iterator, which

[boost] regex documentation bug

2003-06-26 Thread Dave Gomboc
http://www.boost.org/libs/regex/template_class_ref.htm#partial_matches There are two examples given. Though the examples are different, in both cases, the example links to a complete implementation of the first example. This likely was a cut-and-paste error. Dave

[boost] regex possible bug

2003-06-28 Thread Dave Gomboc
Thanks for the quick fixes on the other bug reports, John. Here is what might be a new one. The code below indicates that no match was found, but I was expecting it to indicate that a partial match was found beginning at 'a'. If I don't push the space on beforehand, I do get a partial match.

[boost] minor nitpick: why signal.hpp instead of signals.hpp? (notext)

2003-07-08 Thread Dave Gomboc
___ Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

[boost] boost::signal patch

2003-07-08 Thread Dave Gomboc
At the top of signal.hpp: namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace BOOST_SIGNALS_NAMESPACE { namespace detail { templateint Arity, typename Signature, typename Combiner, typename Group,

[boost] RE: Re: Filesystem: create_directories

2003-08-03 Thread Dave Gomboc
create_directory and create_directories Another option might be: create_directory_and_parents That name is longer than create_directories although it better describes the function. I like create_directory_path That one's good, and captures the essential distinction

[boost] Re: boost::array

2003-08-14 Thread Dave Gomboc
dave const in array{] = {1, 2, 3, 4}; dave boost::arrayint ba(array); dave std::copy(ba.begin(), ba.end(), std_ostream_iteratorint(std::cout)); dave dave Is there already a way to do this? Or is there some reason why dave one would never want to do this? dave dave AFAICR boost::array allows

[boost] Fw: boost::filesystem file restrictions

2003-08-15 Thread Dave Gomboc
-- portable_path(/foo/bar) - throws on Windows -- -- Not sure why this would throw, what is the purpose of -- portable_path? /foo/bar is perfectly reasonable on Windows. - - It's perfectly reasonable but it doesn't have a portable meaning. - It - is a relative

[boost] Re: Optional, tie, and iterator_adaptor

2003-08-30 Thread Dave Gomboc
Right now I am questioning whether the pointer-like semantics is worth it to me. I would probably prefer that clients type more to test whether a value is initialized so that they can type less to call a function that takes an optional as a parameter when they have a value to pass in. Sorry

[boost] Re: Optional, tie, and iterator_adaptor

2003-08-30 Thread Dave Gomboc
template typename T class nilable { Was that small enough to be considered not copyrightable, warrantable, etc. ? If so, fine. Otherwise I guess I have to disclaim any warranty, etc. Boost Public Licence? Dave ___ Unsubscribe other

[boost] generic uses of optionalT

2003-09-01 Thread Dave Gomboc
Here's a (contrived) example of how the implicit conversion breaks generic code: [example snipped] The point is that optionalT is not a T, and most notably, a template function will never perform the coercion. Replace the lines like B b = get2(args); in your example with real calls

[boost] Re: generic uses of optionalT

2003-09-01 Thread Dave Gomboc
[Dave Abrahans] Optional is a container. I've never seen a container in C++ which didn't have both a value interface and an element-access interface. How do you propose to achieve that with optional? It darn well shouldn't be a container, it should be a concrete type! ;-) [Joel de Guzman]

[boost] Re: generic uses of optionalT

2003-09-01 Thread Dave Gomboc
[Eric Friedman] Why not overload boost::get again for optional? It might be a good idea for other reasons, but it doesn't solve the problem I'm trying to solve. [Brian McNamara] do_something( adapt( 3 ) ); do_something( adapt( nilableint(3) ) ); do_something( adapt(

[boost] Re: optional, tie, and iterator_adaptor

2003-09-01 Thread Dave Gomboc
[Fernando Cacciola] The most fundamental point is that being Haskell a pure functional language there is no possibly undefined behaviour to worry about, so Maybe doesn't need to address this issue as optional does. ... and later ... I account the possibly undefined behavior of accesing an

[boost] Re: Re: Re: Re: Optional, tie, and iterator_adaptor

2003-09-02 Thread Dave Gomboc
[Fernando Cacciola] I'm saying that the choice made by variant in this regards is to the code using get as hopeless as undefined behaviour. I don't think that preconditions (and exceptions thereof) should be used to arbitrarily make the illusion of giving meaning to an operation that is