> Why not do the same for other compilers? For instance, on GCC:
Last time I checked __align_of didn't work with templates, which is a bit of
a showstopper in this case..
John.
___
Unsubscribe & other changes: http://lists.boost
return 0 on success, alternatively you're back to rolling your own, BTW why
do you want this? If a regular expression is valid, then presumably at some
point you would want to use it? I ask because the job of checking the
expression for validity is essentially the same as compiling it to a s
> Thanks for your reply.
> I've created my own vcproj (VC++ 7.1 project) for building the libs that I
> need,
> and I've used the /MD flag which is the "multithread- and DLL-specific
> versions" flag (used also for my application),
> which means that
ow, using my library, the above code
> can be fixed like this:
>
> template < typename char_type >
> void g()
> {
> std::basic_string< char_type > str( TextAutoSelect( char_type, "hello"
> ) );
&
ur question: Boost is always as thread safe as the
runtime it's built against.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
r program via autoconf then there are some
nice looking autoconf macros on the net, for example:
http://ac-archive.sourceforge.net/Installed_Packages/acx_pthread.html.
Sorry to make this complicated, but threads _are_ complicated
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
it might be worth documenting somewhere, perhaps as a comment in
> cstdint.hpp?
Apparently __int64 does work with /Za, so I've changed boost.config to
enable it in that case - it should fix your date/time problems as well.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
e is a workaround for vc6 in there already, I've enabled this
for Borland as well, regex can now be mixed with .
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
; wouldn't concern me, but it seems as though in some cases they change the
> way Boost will interact with my program (e.g., shared_ptr and thread
safety).
Threading support is on when BOOST_HAS_THREADS is defined, and off when it's
not, or forced off by defining BOOST_DISABLE_THREADS,
p thread
will tell you what -pthread does on your system.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
reate it. Haven't tried without it... I'm using the 5.6.4 compiler BTW.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
true of the C++ std lib as well
BTW).
We are aware that this is an issue, and there is work going on to provide an
install procedure, that will address this by mangling library names. I hope
we can provide an official rpm specs file as well,
error as well:
#include
#pragma hdrstop
enum enum_t
{
one = 1,
two = 2
};
int test()
{
int a = one | two; // error
int b = one + two; // error
int c = (int)one & (int)two; // OK
return a & b; // OK
}
which doesn'
> Compilation of Boost.Regex using Borland C++ 5.5 currently gives a bunch
of
> "previous options and warnings not restored" messages. The culprit is
> boost/regex/config/cstring.hpp where the lines
Fixes are in cvs now.
Thanks for re
> see boost::is_POD.
And has_trivial_copy has_trivial_assign has_trivial_destruct etc....
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ndard
(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1377.htm).
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
so I guess we're back to setting
BOOST_HAS_THREADS unconditionally for that compiler :-(
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ot emit thread safe exception handling code.
Thus while for C programs enabling thread support is just a question of
linking to the right libraries, for C++ you also need to ensure that the
compiler "knows" that you want thread safe code.
John.
___
On the other hand, "hull" encompasses the idea of
a "periodic hull" that can be used for periodic intervals of time...
On Monday, August 18, 2003, at 02:39 PM, John Fuller wrote:
It also has the advantage of being similar to the use of "makespan" as
the time from
t
It also has the advantage of being similar to the use of "makespan" as
the time from
the start time of the first job to the completion time of the last job
in job scheduling
problems.
On Monday, August 18, 2003, at 02:18 PM, Victor A. Wagner, Jr. wrote:
I suggested it because we write software
HL7 v3, a health care application layer specification, uses the term with time intervals as
an operation on a totally ordered set that produces the smallest interval that is a superset.
For example, hull({[1,5], [7,10]}) == [1,10]
The unabridged specification part II available on Dr. Schadow's page
ry's
requirements?
On the other hand, I notice that the requirement to specify this, is only
for conforming C applications, nothing is mentioned about other languages
(if we're being picky about this).
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
st f); would look better.
Users would (should) set this in main(), while there are no more threads,
and it could play nicely with thread-safety as well.
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
> John,
>
> What compiler are you using? The example only works on VC 6. I added
VC6 :)
> that limitation to the description. I'll have a version ready for VC
> 7.1 soon.
>
> I did fix the include file problem. The file was on my box :)
>
What do you mean? I
e way to do this is with the new bcp tool - something like:
bcp --boost=boost-path --unix-lines --cvs "." destination-path
will produce a clean copy of all of the boost cvs with \r's stripped from
text files - we could probably even write a Jamfile that would automate the
re
> So John, would you be interested in trying to get this sorted out for
> the next release? As I have said, I currenly only use BCB, and so can't
> offer much help for other compilers.
Yep.
> Would it be best to have something like a boost/config/preinclude.hpp
> file which
gt; try to submit a patch (I believe it'd be less than half an hour for
someone
> knowing config). Just let me know.
I'm pretty sure that I fixed that in the main branch, I'm not sure what
changes would need to be merged into the release br
s you reported (and bring a few
other config headers up to date to cope with new compiler/platform releases
etc). If this can make into the release it would be a good thing IMO.
Thanks,
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ou don't depend on any boost lib that uses threads, then I would guess
that the culprit would be the std lib used (probably synchronises it's
iostream code somewhere), in which case you're going to need to use the
second option above.
John.
__
>
> What are the pros and cons of the different approaches?
Personally I prefer, namespace std { using ::abs; } approach, however this
can cause overload ambiguities on vc6 (but this is legacy support now
right?), likewise mixing the two approaches with the same function name
messes up
> Just out of curiosity. What the heck is librt?
It contains the POSIX realtime feature set (used by boost.threads, and hence
tested by boost.config for timeouts and thread priorities and the like).
John.
___
Unsubscribe & other change
I'm trying to remember, did someone around here come up with some code that
can tell at compiler time whether an object has a specific member or not, I
can do it for operators, but not a member typedef (which is what I want)...
Thanks,
e;
As a matter of fact, I wanna build a GUI but for win32 only.
I'm not sure when I'll have the time, but I'll do it. This is because I only
have experience with win32 GUI and it will take much less time.
Best,
John
- Original Message -
From: "E. Gladyshev" <
t; time_duration::total_hours() - the number of hours (ignoring mins, secs,
> > etc.)
>
> Don't see how this would be different from the current method.
It wouldn't ;) Just to be consistent ;)
Best,
JOhn
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
usage, I'll add this to the config docs in due course, but
lets get it running through the regression tests first...
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
> See boost/mpl/aux_/has_xxx.hpp. Example usage in
boost/detail/iterator.hpp.
Thanks, I'll look into it.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
se?
>
> Only pipestream is thread safe. Iostreams are not.
I made them thread-safe ;)
Anyway, the point is that I'm interested in iostream-like pipes.
I wanted to download them, but I dunno what the problem was, but could
not convice yahoo to give it to me :(
Will try agai
ges now or wait until
after the next release - Beman I guess we have a couple of weeks still to
run yes?
[ Footnote - on second thoughts it just means moving code that's in
boost.regex now into the central config system it's not new code - so
CIT_TEMPLATE_TYPE(void)
in this particular case.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
td::string& s)
{
static const std::regex e("[\\[\\]$\\^|.+*?(){}]");
return regex_merge(s, e, "$&");
}
Just off the top of my head and untried
I'll try and think up something more general that works with all the flag
settings though...
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
's obfuscated indeed, but that's
because I had to tweak it to work with VC6.
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ust presentation.
Or, you want a three-state button (pushed/ not-pushed/ disabled).
You first have to allow for that (presentation), then you can think
about linking to some data
(like, if
i < 0 -> not-pushed
i > 0 -> pushed
i = 0 -> disabled)
After you have that in
Eugene,
one more thing when you implement the GUI library.
I ALWAYS hated the message maps from MFC/WTL.
So now I came up with a quite cute method of automating registering of events for a
given window.
(this should work for registering messages, etc.)
It's very flexible. In other words, whe
nd I have a job also ;)
But, if there's interest in it, I'll make some time.
Otherwise, it'll wait a couple more months :(
Best,
John
> from the {o,i}stream features which are only concerned with
> formatting. Does that make sense?
>
__
n't work, it just
crashes when I call anything", which almost always turned out to be caused
by ODR violations (either the user had changed an ABI option, or had linked
to the wrong runtime-library-build variant), these basically stopped
overnight once I modified my code to stop those (th
ferent characters for the \ x { and } regular characters, so that escape
sequences like: \x{32} don't work anymore.
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
condition: check result on function exit
> SMART_ASSERT_POST(ref(result) >= 0);
>
Using ..._POST could just complicate things.
Users should know to use, for each tested argument ref(...),
so you can come up with something like outlined above.
I'll think about it (something u
27
#endif
// code here
#ifdef __BORLANDC__
# pragma option pop
#endif
We should standardize this boost-wide really in some kind of prefix/suffix
header.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
> I might not have followed the discussion to deeply, but it does look to me
> like John is entirely right. Traits can fundamentally do one customization
> per type. That's not going to be enough if you have the same type
> representing multiple handles, as is the case w
_ << endl;
> }
>
> int main()
> {
> foo((infinite::begin, true, (char *) "adasd", 12367, 127.2));
> }
I have not compiled it, but looks ok.
Anyway, why the two (( and )) ?
I think it's not needed.
Anyway, I'm not sure how much this generality can buy
alization with constant. The program
below also refuse to compile
Yep, we even have a macro for it: BOOST_NO_CV_SPECIALIZATIONS, evidently
boost.graph doesn't use it.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Hi,
I tried compiling the boost_gui code, but got compile-time errors.
Do I need a Service pack?
Example:
desired_size_operations.cpp
d:\john\programming\boost\boost_gui\boost_gui\floatroutines.h(8) : error
C2065: 'pow' : undeclared identifier
d:\john\programming\boost\boost_gui
, if you have the opportunity
> to modify the source why not just convert to using the library?
Well, not such a good idea - this is because on the server side, I have a DB
that keeps some table fields as time_t values - it would be WAY TOO MUCH
to do.
> It will give you more streaming options than the wrapper class
> without having to write all that code.
Anyway, the code I've sent could be modified to work with your ptime (date,
etc.) as well, since the same problem occurs with your code as well.
When debugging, you see a 'ticks' value - but it's kind of hard to know the
time it represents.
I'm not sure when I'll have some time to do this.
>
> Thanks for the suggestions.
>
Any time ;)
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
efficient as time_t in release
mode)
In debug mode, each value contains a user-friendly string corresponding to
the time_t value.
As a side-note, this could be made much more general, to work for other
HANDLE-like types (for instance, HWND in Win32 or so).
What do you think?
Best,
John
--
cool!
Small note: instead of 'interface', maybe you could use some other word,
like interf or something, since VC6 has its own (stupid) extension, and
highlights the 'interface' as a keyword (not sure if VC7 does the same).
Anyway, users
ld require the condition to
be
> a boost::bind type function or boost::lambda type expression that could be
> evaluated later. Something like a ScopeGuard that evaluates to an
assertion,
> in fact. Do you have any interest in pursuing this? I'd be glad to help,
if
> I c
windows, each window having more than 20-30 controls, to
have an OVERVIEW.
Not talking about maintaining that code.
Not talking about internationalization.
So IMHO resource files are THE option.
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
h possible type of GUI (edit box, push button, etc), just
create a control that can respond to them in an easy and straightforward
way.
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ion with the help of a
> serialization library.
>
Indeed, that would be cool!
I suppose you're talking about something that will write ALL GUI objects
from a OS-independent resource file to a native resource file.
Best,
John
___
Unsubscribe & other ch
>I've applied the first two; I'm not comfortable applying the regex
>patches myself; it takes someone who knows the library to verify that
>they're OK. John can do it, though, as far as I'm concerned.
done,
John.
__
>I've just written the following. It (correctly) fails for MSVC 6.5 and gcc
3.2 for
>cygwin,
>but I cannot test it in a conforming compiler.
I had to modify it a little to make it conforming code, but it's now in cvs.
Thanks,
John.
red (is_base_and_derived
fix for EDG versions prior to 243).
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
cc seems to be a little more specific than we normally set
the macro for, but I don't see any reason why we shouldn't set it. Am I
right in thinking that this is specific to gcc 3.1 and 3.2? Also do you
have a test case that can be
n to get the new directories
I've added...
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
> I don't see that the library builds OK for cwpro8. Strangely, Beman's test
> results are fine.
Beman's using a "special" fixed version of CW8 which presumably will become
an official fix from MW at some point (it fixes the internal compiler erro
ersonal oppinion is that going further is not worth the trouble,
but I hope you'll prove me wrong)
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
longitude?
> c) Which is the closest gas station to this point?
> d) Which are the 10 most similar objects to this complex object?
>
I would be interested in this. Any code we can see?
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
asier, wouldn't it?
>
> Sure, but then we have to deal with rounding issues. To me the
> compactness of this is not worth the trouble it creates.
Yes, indeed. But using fixed-point decimals ;-)
Eventually you could do something like:
hours( one_day() );
or something similar
ance, if I want to iterate 1 and a half days, I think it's more
expressive to say:
time_iterator it( start, days(1) + hours( 12)) instead of:
time_iterator it( start, hours( 36))
Best,
John
--
John Torjo
-- "Practical C++" column writer for builder.com.com
Freelancer, C++ cons
>
> John Torjo schrieb:
>
> > Exactly! Don't do anything! But in order not to do anything, I need to
know
> > whether the compiler support a FUNCTION-like macro or not.
> >
> > Otherwise, I won't know (and assume it has), and print to the user
some
> John Torjo wrote:
>
> > Yes, I remain unconvinced ;-)
> > This is because some compilers do not provide such a FUNCTION facility.
> > VC6 is one of them. What should I do for it?
>
> It sounds like you are asking for the wrong macro!
> You are trying to suppor
"Eugene Lazutkin" <[EMAIL PROTECTED]> wrote:
>Inline.
>
>"John Madsen" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>>
>> If you can convince most of the people on this list to provide an
>automatic
>> conversion, mor
eems fundamentally flawed as two separate
>types could share the same traits.
>
I think that the traits system makes the typing stronger. It guarantees
distinct types even in the face of handles that are otherwise
indistinguishable. I looked at your design, but I think I can handle what
you&
unctionality or slightly cut version of
>PBSP (IMHO). That is why I stick with the my PBSP and use it for all my
>"smart pointer" needs.
>
I can only repeat that pointers are not handles. You seem to be describing a
policy based resource management class. I think this i
_str(). The former is needed to
> interface legacy systems, which is not frequent case.
>
Not quite. It's quite frequent to me, when I use STL strings on Win32 - for
calling UI functions like MessageBox, SetText, etc.
Best,
John
___
Unsubscri
long time, WTL is indeed cool!
And as far as I know it's developed by 3 people that work at Microsoft.
It really gives you a lot of freedom - at combining what features you want
(resizability, message filtering, etc.)
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
sidenote, I will give full details about SMART_ASSERT_CONTEXT in the
documentation of SMART_ASSERT - sorry it hasn't been done yet :-(
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
d
>idiom, we should.
>
If you can convince most of the people on this list to provide an automatic
conversion, more power to you. I still maintain that avoiding hard to diagnose
errors is worth much more than saving 6 characters of typing.
For a discussion of why user defined conversions are a bad idea (not always,
but most of the time), see More Effective C++, Item 5.
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
se of PBSP and I do not see
>any reason not to use it.
>
Please tell me where my reasoning is incorrect (I would genuinely like to know).
I read all of the previous discussion of this on the boost list and did not
find any good arguments against mine.
John
_
"Eugene Lazutkin" <[EMAIL PROTECTED]> wrote:
>Inline,
>
>"John Madsen" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>> I have little experience with X-Windows, so I can't comment on that.
>However,
>> there is a
;> { if (is_valid(h)) ::CloseHandle(h); }
>> static handle_type default_value()
>> { return INVALID_HANDLE_TYPE; }
>> static bool equal(handle_type lhs, handle_type rhs)
>> { return lhs==rhs; }
>> };
>>
>> (This example is taken from or
;file",BOOST_SMART_ASSERT_FILE).context("line",__LINE__).context(BOO
ST_SMART_ASSERT_FUNCTION_KEY,BOOST_SMART_ASSERT_FUNCTION)
#else
#define SMART_ASSERT_CONTEXT
context("file",BOOST_SMART_ASSERT_FILE).context("line",__LINE__)
#endif
I would really like the BOOST_HAS_C
Gregory Colvin <[EMAIL PROTECTED]> wrote:
>
>On Friday, Jul 18, 2003, at 15:21 America/Denver, John Madsen wrote:
>
>> "Eugene Lazutkin" <[EMAIL PROTECTED]> wrote:
>>> I have a few comments in no particular order.
>>>
>>> 1) I
;m not sure exactly
how this would work in the cases of handles. My inclination, though, is that
this issue would be better addressed in the thread library. I had in mind that
smart_handle would perform a fairly simple task across a very wide variety of
handles. For many of those ha
as possible.
>
I agree that in many cases scoped is more useful. However, it was fairly
trivial to do shared and weak, so I figured why not? Also, shared_handles will
work in stl containers while scoped_handles will not.
>Thanks,
>
>E
n the lines of:
template < typename type, typename result, result type::* ptr >
struct member_extractor
>
>which takes us again to the redundancy we were trying to avoid.
>Something in the way of eliminating this redundancy, however, would be
>a boon. Maybe some me
oks much better (IMHO).
And shouldn't it be :
struct not_a_type {};
?
Best,
John
>
>-Howard
>
>___
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
xercise all of the code.
I'd certainly love to hear ideas, criticism, etc. and ultimately see this
become part of boost.
Thanks,
John Madsen
john at illura dot com.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
gnificant memory loss.
That does look like a bug... Bill?
John Maddock.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
the smart_assert
(www.torjo.com/smart_assert.zip) library.
On CUJ, I showed only a trimmed version of it.
Best,
John
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
TLPort outputs in the ouptut window: "STL assertion failure :
> _Dereferenceable(*this)"
>
> So, for STLPort, an iterator pointing to the end of a container can't be
> dereferenced. That seems judicious to me, but is it in accordance with the
> standard ?
>
> If
e of
Dr Dobb's Journal, I don't have an issue number to hand though.
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ou check that it does the right thing?
Thanks,
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
f
iterator_adapter? It seems the iterator_adapter is incorrectly implementing
advance.
Regards,
John Bandela
PS: I don't know if this is the place to ask, but I have updated tokenizer
to the new iterator adapters. Is there some place it shou
.
John
It was not Death, for I stood up,
And all the Dead, lie down -
It was not Night, for all the Bells
Put out their tongues, for Noon.
It was not Frost, for on my Flesh
I felt Siroccos - crawl -
Nor Fire - for just my Marble feet
Could keep a Chancel, cool -
And yet, it
> I believe that consistent use of std::advance would solve the problem.
> Or would this change be so costly that I ought to use vector or deque?
> Unfortunately, doing so would cause me other problems such as iterator
> invalidation. :-/
Should be fixed in cvs now.
Thanks for the r
or.
Thanks, fixed in cvs,
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
obviously a
mistake. Also since only borland-tools.jam provides this option, I think we
can just remove all reference to it (or at the very least rename it to
something more suitable and turn it off by default in features.jam).
Thanks,
John.
___
Unsubscribe
ure
script would do that, but that's a little tricky on win32 :-(
John.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
aving trouble with boost licenses could take a
look and see if this helps smooth their problems out I would appreciate it.
Regards,
John Maddock.
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
1 - 100 of 396 matches
Mail list logo