- Original Message -
From: Reece Dunn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 1:57 PM
Subject: Re: [boost] Re: Enum operators
I have adopted a Java-style approach to enumerated-style values (don't
know
if this is the best approach, just the way that I do it
- does not work for wchar_t. While this might seem silly, it's not,
since
VC allows for a TCHAR* command line string.
I have to consider this. An obvious approach would be to add template
parameter to every class, telling which char type to use. So investigation
is needed to find
, SMART_VERIFY_RET
TODO: minor improvements/ ENFORCE.
Best,
John
--
John Torjo
-- Practical C++ column writer for builder.com.com
Freelancer, C++ consultant
mailto:[EMAIL PROTECTED]
smart_assert.zip
Description: Zip compressed data
- Original Message -
From: Pavel Vozenilek [EMAIL PROTECTED]
To: John Torjo [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 10:39 PM
Subject: fix of fix
Hello John,
The code I sent before to disable warning isn't the best.
Here's better version (restores previous settings instead
Hello John,
I tried assert lib under Borland C++ Builder and Intel C++ and bellow are
few notes so far.
There seems to be recursive loop bug (item 10).
/Pavel
PS: it is sooo big: 20 headers and 100kB of source. I would never
imagine
old
#define assert(x) if (!(x)) abort()
can grow
.
--
John Torjo
-- Practical C++ column writer for builder.com.com
Freelancer, C++ consultant
mailto:[EMAIL PROTECTED]
smart_assert.zip
Description: Zip compressed data
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
void f( in_out int is_not_changed_ )
{
// use is_not_changed_, but don't change it
}
I think there would be a much bigger problem (code inside the function would
change).
Just consider
void add_char( std::string str, char ch)
{ str += ch; }
Now, if we change it so be in_out,
If VERIFY is used in MFC to mean an assert even in release mode then
that
is
probably the best name.
In MFC it doesn't have that meaning though. It means that the expression
passed to VERIFY will get evaluated in the release build but the result of
this expression will not get checked in
- Original Message -
From: Pavel Vozenilek [EMAIL PROTECTED]
To: John Torjo [EMAIL PROTECTED]
Sent: Thursday, May 22, 2003 11:25 PM
Subject: one small assert fix
boost/smart_assert.hpp can have code:
#ifndef ...
#define ...
#if _MSC_VER = 1020
#pragma once
#endif
Thanks for your interest. I have posted the library at
http://groups.yahoo.com/group/boost/files/streambuf_lib/.
Wow! I have not had too much time, but by the looks of it, it's great!
I'm sure interested in this!
Best,
John
___
Unsubscribe
to work with a lot more compilers).
What do you think?
Best,
John
--
John Torjo
-- Practical C++ column writer for builder.com.com
Freelancer, C++ consultant
mailto:[EMAIL PROTECTED]
namespace boost {
template bool x struct STATIC_ASSERTION_FAILURE_BASE;
template struct
- Original Message -
From: popov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 8:03 PM
Subject: [boost] smart_assert and range_ template
(not sure it's the right place to post this, but it seems smart_assert is
(or will) be part of boost, and I can't get the
Hi Danny,
http://www.cuj.com/documents/s=8464/cujcexp0308alexandr/)
Here's an excerpt of some code:
I have some problems to see the connection between smart_assert and your
errounous code below. Can you explain?
The code shown below is from the smart_assert
, or was ||
meant to be there, like this:
BOOST_STATIC_CONSTANT(
bool, is_input_or_output_iter
=
(boost::is_convertibleCategory*,std::input_iterator_tag*::value
||
boost::is_convertibleCategory*,std::output_iterator_tag*::value));
...etc.
Best,
John
--
John Torjo
- Original Message -
From: Pavel Vozenilek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 20, 2003 12:38 PM
Subject: [boost] Re: BOOST_STATIC_ASSERT - a little better
John Torjo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,
I was just thinking
Subject: Re: [boost] About member extraction
From: Joaquín Mª López Muñoz [EMAIL PROTECTED]
Date: Mon, 14 Jul 2003 14:24:37 +0200
To: Boost mailing list [EMAIL PROTECTED]
Daryle Walker ha escrito:
But doesn't the PtrToMember template parameter already imply the
Type and Class
On the other hand, perhaps you have a use case that clearly demonstrates
the
need for BOOST_HAS_CURRENT_FUNCTION?
The SMART_ASSERT library clearly needs it.
The idea is: when an assertion fails, in case BOOST_CURRENT_FUNCTION holds a
meaningful value, I want to show it. Otherwise, not.
Hi Peter,
If a compiler has a current function facility but is not currently
supported
by current_function.hpp, if you show '(unknown)' users of this compiler
will
spot the problem and submit a patch, or at least report it to us.
If not, they may not even realize that the library could have
Alan Bellingham [EMAIL PROTECTED] writes:
did they give you the name of this library?
Presumably this is WTL - the Windows Template Library.
That's the one.
--
I've used it and it's great!
I hated MFC for a long time, WTL is indeed cool!
And as far as I know it's developed by 3
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 support a compiler that is outdated and long since
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++ consultant
mailto:[EMAIL PROTECTED
For instance, 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))
It's pretty easy to add this yourself if you want:
class days : public
SMTL aims to efficiently solve queries like:
a) Which books where written by authors whose last name begins with
B between 1986 and 1994?
b) How many cities with population above 10,000 are located between
such and such latitude and such and such longitude?
c) Which is the closest
I was thinking about designing a GUI/GDI template
library.
The main ideas are:
1. Create a portable template abstraction for standard
GUI/GDI elements and dialog boxes.
2. Design an iterator-like interface.
3. The most important goal is design a natural
connection between STL
It might not be too hard to make the GUI objects 'serialize' themselves
into a native resource file but this would be useless without something
to convert a resource file back into C++ code. Something like this
could be written on top of a pure C++ solution with the help of a
serialization
2. is there potential to identify a generic state
machine
that can be part of your gui templates/library
without
getting tangled in the application specific
machines. i
One more on the state machines. Even the standard
button control is a state machine (when you press it,
it
1. i'm 99% sure that plain
resource language or even XML is much cleaner than c++ bindings-
templates-operators mess.
Templates aren't always beautiful, but this library is targeted towards
C++ programmers who should be familiar with them. We've had the STL for
over 5
Hi Michael,
1) How is this going?
Unfortunately, I've been EXTREMELY busy these days :(
It's almost done - I've worked on making a small footprint of SMART_ASSERT
(when using SMART_ASSERT, the generated code should be as small as possible)
Note: try the latest version -
Here's an example I just cooked up of using the PP lib to solve a
classic C++ OO problem: repeated boilerplate in the definition of
Pimpl classes. Paul, if you want to put it (or something like it) in
the PP lib docs, you're welcome to.
Hi Dave,
Pretty cool!
Small note: instead of
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
--
John Torjo
Hi Jeff,
Told you I'd come back for more ;)
Here are some more improvements I would consider useful:
[1]
unary operator-(time_iterator).
Example: -hours(24) instead of hours(-24).
(seems more straightforward)
I see your point, but then don't you have to add all the other
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
#include iostream
using namespace std;
namespace infinite
{
template typename T = void, typename U = void
struct typelist : U
{
typedef T type;
T value;
typelist(T const a, U const b) : value(a), U(b) {}
};
template
struct typelistvoid, void
{
typedef void
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 with many C APIs. For
example,
Hi Michael,
Sorry for the late reply...
A postcondition such as I'm suggesting would perform an assertion when a
function (or the enclosing block) exits instead of on the line where the
assertion was defined. Obviously, if a function only has one exit path, it
would be simple just to put
http://lists.boost.org/MailArchives/boost/msg46513.php
indicating some interest in combining thread safety and
decoration. It seems to me (a novice in threading) that
what needs to be protected is the access to the end
of the pipeline, i.e. the final streambuf, which is
connected to the
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,
The confusion is that your interpretation (more
traditional) of a modern GUI framework is a bit
different from notus. We are not concerned with
building low-level controls. The low-level
implementation is basically proveded by the platform
(Mac, win32, etc.). Notus is just going to be using
it.
AFAIK, some gui toolkits use not event, but callback system.
IMHO it is more evective. Definitely it should be discussed
carefully.
Aren't we talking about the same thing? ;)
In response to an event, you call an event callback.
That's what my example does - it's obfuscated indeed, but
Ok, sure. I can't really see anything wrong with your argument. That
said,
I still don't want to change this lightly. While this would make life
easier for users, they are already used to the library. If I get rid of it
and then want/need it back it won't be nice. So I'll put this on my
Larry Evans wrote:
[snip]
indicating some interest in combining thread safety and
decoration. It seems to me (a novice in threading) that
what needs to be protected is the access to the end
of the pipeline, i.e. the final streambuf, which is
connected to the actual output medium
Of John Torjo
Sent: Monday, August 04, 2003 11:36 AM
To: Boost mailing list
Subject: Re: [boost] Re: Re: Re: Re: Re: Re: Re: Re: GUI/GDI template
library
Hi,
I tried compiling the boost_gui code, but got compile-time errors.
Do I need a Service pack?
Example
The current approach is clearly too restrictive and isn't satisfactory.
Beyond the problems you mention, there really isn't a single standard for
portability. Even 8.3 names aren't portable to systems which don't allow
periods in names. A whole family of checkers is needed, giving various
Subject: [boost] Any interest in a string literal selector helper library?
Hi all,
I have written a relatively small library which I've found pretty useful
in my own projects. I have to deal with std::basic_string objects a lot
in my applications, and I almost always write template code
44 matches
Mail list logo