|
Boost : |
From: x.lsi.maillard_at_[hidden]
Date: 2001-12-25 17:55:49
THIS IS AN AUTOMATICALLY GENERATED REPLY
Your mail to me has been discarded
Hi! You have reached the mail filter of one Richard Gooch. I'm sorry
to have to do this to you, but I am now filtering my email to combat
the flood of junk email (spam) that I receive. I'm fed up with having
to waste my time sifting through junk email. This filter also protects
me from certain types of mailbombing attacks.
I received an email from you, but my mail filter doesn't think you
sent it to me personally. This may be because I am on some mailing
list I'm not aware of. It may also have come from a mailing list I
*am* subscribed to, but the list adminstrators have started fiddling
with (breaking) the listserver.
APOLOGIES if the mailing list is genuine (i.e. not a spam list). If
you receive this reply because of a message you sent to a genuine
mailing list, please send me a message (telling me which mailing list
I'm on) with the following in the subject line:
293977
This is my password of the week. My mail filter will then let me see
the message. NOTE: the password MUST be in the subject, not the body.
I will then add a rule for the mailing list (or unsubscribe myself if
I don't wish to be subscribed) so that this won't happen again. I
apologise to people subscribed to mailing lists if this message is
sent to the whole list; I have taken considerable care to make sure
that mailing lists I want to be subscribed to are not affected by my
spam filter.
NOTE TO BULK EMAIL ADVERTISERS, SPAMMERS AND OTHER PARASITES: if you
manage to break through my filtering, rest assured that I will ignore
your message on principle. Future mails will be automatically deleted.
Unsolicited commercial email is unwelcome and costs *me* time to deal
with.
The message you apparently sent to me follows:
>From fxgs Tue Dec 25 23:55:48 2001
Return-Path: <sentto-1234907-19301-1009170554-x.lsi.maillard=wanadoo.fr_at_[hidden]>
Delivered-To: fxgs_at_localhost.hometranet.home
Received: from 192.168.1.2 [192.168.1.2]
by localhost with POP3 (fetchmail-5.9.0)
for fxgs_at_localhost (single-drop); Tue, 25 Dec 2001 23:55:48 +0100 (CET)
Received: from localhost (localhost.localdomain [127.0.0.1])
by mail.hometranet.home (Postfix) with ESMTP id 5C7392B075
for <fxgs_at_localhost>; Tue, 25 Dec 2001 18:49:53 -0500 (EST)
Received: from pop.wanadoo.fr
by localhost with POP3 (fetchmail-5.7.4)
for fxgs_at_localhost (single-drop); Tue, 25 Dec 2001 18:49:53 -0500 (EST)
Received: from mel-rti20.wanadoo.fr (192.168.156.141) by ms4-2.wanadoo.fr; 24 Dec 2001 06:09:22 +0100
Received: from n21.groups.yahoo.com (216.115.96.71) by mel-rti20.wanadoo.fr; 24 Dec 2001 06:09:21 +0100
X-eGroups-Return: sentto-1234907-19301-1009170554-x.lsi.maillard=wanadoo.fr_at_[hidden]
Received: from [216.115.97.163] by n21.groups.yahoo.com with NNFMP; 24 Dec 2001 05:01:26 -0000
X-Sender: rogeeff_at_[hidden]
X-Apparently-To: boost_at_[hidden]
Received: (EGP: mail-8_0_1_3); 24 Dec 2001 05:09:09 -0000
Received: (qmail 48597 invoked from network); 24 Dec 2001 05:09:08 -0000
Received: from unknown (216.115.97.167)
by m9.grp.snv.yahoo.com with QMQP; 24 Dec 2001 05:09:08 -0000
Received: from unknown (HELO n13.groups.yahoo.com) (216.115.96.63)
by mta1.grp.snv.yahoo.com with SMTP; 24 Dec 2001 05:09:11 -0000
Received: from [216.115.96.118] by n13.groups.yahoo.com with NNFMP; 24 Dec 2001 04:58:54 -0000
To: boost_at_[hidden]
Message-ID: <a06d9j+dvl3_at_[hidden]>
User-Agent: eGroups-EW/0.82
X-Mailer: Yahoo Groups Message Poster
From: "rogeeff" <rogeeff_at_[hidden]>
X-Originating-IP: 24.190.34.70
X-Yahoo-Profile: rogeeff
MIME-Version: 1.0
Mailing-List: list boost_at_[hidden]; contact boost-owner_at_[hidden]
Delivered-To: mailing list boost_at_[hidden]
Precedence: bulk
List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
Date: Mon, 24 Dec 2001 05:09:07 -0000
Subject: [boost] proposition to add feature to lexical_cast
Reply-To: boost_at_[hidden]
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: O
Hi, all
Recently I have used lexical_cast extensively. I had a requirement to
be able to accept a integer values presented with any base (10,8,16).
Also I needed to catch an input errors for unsigned integer values to
prevent negative input. With current implementation
lexical_cast<unsigned int>( "-10" ) won't catch any errors. I end up
writing small adaptor class I named integer_adaptor (I am not sure
about this name it's just proposition) with the following
functionality:
template<class IntType>
struct integer_adaptor {
friend std::istream& operator>>( std::istream& str,
integer_adaptor& iad );
operator IntType() { return m_value; }
private:
IntType m_value;
};
template<class IntType>
std::istream&
operator>>( std::istream& str, integer_adaptor<IntType>& iad )
{
str >> std::ws;
std::istreambuf_iterator<char> it( str.rdbuf() );
if( *it == '-' && !std::numeric_limits<IntType>::is_signed )
throw bad_lexical_cast();
str.flags( str.flags() | std::ios_base::basefield );
iad.m_value = 0;
str >> iad.m_value;
return str;
}
I think due to a general applicability of the issue, it could worth
sharing.
Code and small test are located here:
http://groups.yahoo.com/group/boost/files/lexical_cast_propositions/pr
oposition2.cpp
Regards,
Gennadiy.
Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk