Douglas Gregor wrote:
On Monday 11 November 2002 08:32 am, Alexander Nasonov wrote:
Additionally, two types of control are desired:
1) Control over real types of arguments. It is a limitation of
dynamic_any library that arguments must be converted to _one_ type before
a call. But they can
Alexander Nasonov wrote:
You can create your own framework for dynamic_any using
dynamic_any::function. In a combination with simple and typesafe interface
it could make great library. Basic idea is here:
namespace your_framework
{
// ...
namespace detail
{
// ...
struct
dynamic_any in a way that I can't even imagine. It promises to be very
interesting time.
--
Alexander Nasonov
Remove -nospam from my e-mail address for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
::remove_reference from
boost/type_traits.hpp.
any_castT(x) will return a reference to value contained in x if its
type is T, or raise bad_cast otherwise.
Boost.dynamic_any has extract functinos which work this way.
--
Alexander Nasonov
Remove -mycop from my e-mail address for timely response
dynamic_any
--
Alexander Nasonov
Remove -mycop from my e-mail address for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
= 2;
f(i); // ++i
double d = 3;
f(d); // ++d
}
--
Alexander Nasonov
Remove - m y c o p from my e-mail address for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Douglas Paul Gregor wrote:
On Tue, 18 Feb 2003, Alexander Nasonov wrote:
With a help of boost::dynamic_any::call operation (not yet implemented)
it's possible to use boost::dynamic_any::any instead of Boost.Function.
Though this new solution is less specialized and probably slower
::is_referenceT::value id;
return extractT(p, id);
}
--
Alexander Nasonov
Remove -mycop from my e-mail address for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
optimize dynamic
memory allocations (a possibly even more) away.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
in Boost but it
may be of interest anyway. Details already discussed with Francis
Glassborow, David Abrahams and Douglas Gregor through private e-mail.
See you there!
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
that I need is just an allocator interface.
It would be also nice not to use dynamic allocations at all for built-in
types.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes
while making a copy:
any c(a); // c uses new/delete
any d(b); // d uses fast_allocatorint?
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org
Alexander Nasonov wrote:
Vladimir Prus wrote:
You can add template parameter to 'holder' only,
and another constructor, which allows to specify allocator.
But then you can't make static_cast to holderKnownType, UnknownAllocator
inside any_castKnownType(a); May be wrap allocator specific
Alexander Nasonov wrote:
Lambda cannot deduce return type of *begin. What should I do? May be some
kind of traits or nested template should be defined for any?
I've just found it in lambda documentation.
BTW, I have some progress in the library. Reference section is partially
done:
http://cpp
of
variant (which is coming, by the way).
Input?
I agree.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Alexander Nasonov wrote:
I agree that a-move(10, 10) is clearer then move()(a, 10, 10). One big
plus of it is ability to overload move member-function: a-move(Point(10,
10)). You can't do that with move operation:
move()(a, 10, 10);
move()(a, Point(10, 10)); // error
You have
to C++98 level: why delete
operator doesn't assign deleted pointer to 0? I'm sure it has already been
discussed. You can search for the topic in comp.std.c++ and
comp.lang.c++.moderated.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
, father);
In addition to better static type control you can track pointers or a list
of pointers at compile-time and then use it at runtime to set up the schema
and to load an object with all its relations.
--- cut ---
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail
elelemnt has
correspondent node that can be visited. The challenge is to build a
complete set of nodes with a complete set of operations.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe
Alexander Nasonov wrote:
class base_node // represent a base of a concrete class
{
// ...
//
virtual void* derived_to_base(void* base_ptr) const = 0;
};
Oops, I made a little naming mistake: base_ptr should be derived_ptr.
BTW, compile-time retrospection could be used to find
.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
where members are grouped by classes (bases and
end class), types of form elements are determined automatically from member
information and pointers are represented as references. Most exciting is
that you get it using one function call! (if you described all classes
earlier).
--
Alexander Nasonov
();
if(lock lock1 = timed_mutex::scoped_timed_lock(mtx, xt))
{
// ...
}
xt = get_it();
if(lock lock2 = timed_mutex::scoped_timed_lock(mtx, xt))
{
// ...
}
}
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
http://www.cuj.com/documents/s=8470/cujweb0309nasonov/
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
channel; // good
// too long?
synchronization_channel_istream in(channel);
synchronization_channel_ostream out(channel);
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes
://groups.yahoo.com/group/boost/files/pipes.zip
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Philippe A. Bouchard wrote:
There is another pipestream project you can take a look at:
http://pstreams.sourceforge.net/
May be I missed something but this library is about reading from stdin and
writing to stdout of other process. It's not about inter-thread pipes.
--
Alexander Nasonov
Bohdan wrote:
Alexander Nasonov [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
graydon hoare wrote:
an inter-thread pipe might also be referred to as a synchronization
channel, if you want to avoid confusion about names (pipes being a
particular OS object).
-graydon
thread safety could be separated
from the {o,i}stream features which are only concerned with
formatting. Does that make sense?
Only pipestream is thread safe. Iostreams are not.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
++();
// ...
};
// Design two
templateclass Iter Iter get_iter_for_typeof();
templateclass Iter, class T = typeof(*get_iter_for_typeof())
struct bit_iterator
{
static_assertis_integralT ;
bit_iterator(Iter);
bit_iterator operator++();
// ...
};
--
Alexander Nasonov
Remove minus
then:
memcpy variant storage containing value1 into local1
initialize variant storage with copy of value3 content (throws!)
memcpy local1 back to variant storage
Too complicated? may be ...
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
properties beyond the standrad.
Why not optimize variant for compilers which safely memcpy forth and back?
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org
);
variantstd::string,int,char i(0);
variantstd::string,int,char s0 = plus()(s, i);
// s2 == std::string(s0)
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http
. Instead of dynamic_any, or even adaptable_any,
use the name any_with. This would give you any_withio_operations,
which reads as a perfectly accurate description in English.
Kevlin
--- end of cut ---
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
.
--
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response
___
Unsubscribe other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
35 matches
Mail list logo