Bjørn Roald | 1 Jan 11:33

Re: bcp update #2: namespace renaming

On Tuesday 29 December 2009 10:59:06 am John Maddock wrote:
> > That is great news, 

I just tested both the two new options in bcp.  The modified bcp'ed source code 
and the produced libraries after a plain bjam build of a selected subset of 
boost looks very good.  I have to agree with Artyom, this is great news.  

This give both open and closed source library developers a very nice tool 
which allow use of boost in their library implementation without risking 
polluting the boost namespace for their users. In other words, this make use 
of boost more feasible for a large group of C++ developers which otherwise 
typically would re-invent what they needed.

> > one of the most missing features.
> >
> > Several questions:
> >
> > a) Does it rename macros as well? I mean if I have a library
> >   with defined BOOST_ASIO_ENABLE_FOO_BAR would it be renamed
> >   to NEWNAME_ASIO_ENABLE_FOO_BAR ?
> 
> No not at present.  That's whay I said you can't #include two different
> Boost versions in the same TU.
> 
> That's something I might look at later.

This would be useful if full side-by-side header support is provided.  But 
that is more involved than just renaming macros.  Also, I think what is in now 
is the more important feature.  

(Continue reading)

Daniel James | 1 Jan 12:26
Picon
Favicon

Re: bcp update #2: namespace renaming

2009/12/28 John Maddock <john <at> johnmaddock.co.uk>:
> OK, since folks keep asking for it, bcp will now do namespace renaming, the
> two new options are:
>
> --namespace=newname
>
> Renames namespace boost to "newname" in all the source files copied.

There are a few places where another namespace is used. A quick search
found boost_asio_handler_alloc_helpers, boost_concepts (in the
iterator library), boost_optional_detail, boost_132 (in serialization)
and boost_swap_impl. Will that be a problem?

Daniel
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Mathias Gaunard | 1 Jan 12:54

Re: [any] New feature idea for boost.any

Andres B. wrote:
> Hello, i am Andrés, i am new in the boost world and i have an idea to
> boost.any.
> 
> With the actual boost::any i can't do this:
> 
> boost::any any_var;
> int i;
> any_var = 10;
> i = 1 + any_var;
> double d;
> // d = 1.0 + any_var; // throw: bad_any_cast, because any_var is int
> any_var = 10.0;
> d = 1.0 + any_var - 3.0; // now any_var is double

Any is type erasure for any type, or rather a type that is 
CopyConstructible and Assignable.
What you want is type erasure for a type that is Addable as well, which 
makes it more specific.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

John Maddock | 1 Jan 13:29
Picon

Re: bcp update #2: namespace renaming

>> > a) Does it rename macros as well? I mean if I have a library
>> >   with defined BOOST_ASIO_ENABLE_FOO_BAR would it be renamed
>> >   to NEWNAME_ASIO_ENABLE_FOO_BAR ?
>>
>> No not at present.  That's whay I said you can't #include two different
>> Boost versions in the same TU.
>>
>> That's something I might look at later.
>
>This would be useful if full side-by-side header support is provided.  But
>that is more involved than just renaming macros.  Also, I think what is in 
>now
>is the more important feature.

I assume that for full side-by-side inclusioin in the same TU we would need 
to rename macros and also rename the boost/ directory (and hense all 
#includes).  Anything else?

Cheers, John.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

John Maddock | 1 Jan 13:30
Picon

Re: bcp update #2: namespace renaming

>> OK, since folks keep asking for it, bcp will now do namespace renaming, 
>> the
>> two new options are:
>>
>> --namespace=newname
>>
>> Renames namespace boost to "newname" in all the source files copied.
>
> There are a few places where another namespace is used. A quick search
> found boost_asio_handler_alloc_helpers, boost_concepts (in the
> iterator library), boost_optional_detail, boost_132 (in serialization)
> and boost_swap_impl. Will that be a problem?

Sigh... probably :-(

Is that a complete list of all the top level namespaces?  If not, any ideas 
on how to quickly produce one?

Thanks, John. 

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Artyom | 1 Jan 15:28
Picon
Favicon

Re: bcp update #2: namespace renaming

> 
> Sigh... probably :-(
> 
> Is that a complete list of all the top level
> namespaces?  If not, any ideas on how to quickly
> produce one?
> 

Hello,

Indeed this is a problem, but I also remember that not only namespace are 
relevant.

In some older versions of boost I remember (I think in boot_thread 1.35)
some function had names like:

extern "C" boost_thread_some_callback_functions

Were used, also, if at some point shared object/dll dynamic loading
would be added they may use resolveable points like

extern "C" boost_foobar_resolvable_sybol.

My be added, outside boost namespace in order be loaded with
dlsym/GetProcAddress.

I suggest different approach I used in my namespace renaming
script:

http://art-blog.no-ip.info/files/rename.py
(Continue reading)

Andy Tompkins | 1 Jan 16:18
Favicon
Gravatar

Re: [uuid] - release schedule

> > > I've added your library to the root index.html file, and will add
> > > it to the website. The inspect results are clean, so I think the
> > > only things left to do are to check the documentation and make
> > > sure the test results are fine.
> >
> > Daniel, could you check the documentation? It surely exists and
> > looks fine to me, except for slightly suboptimal formatting of
> > examples, but I'd rather have you review that.
> >
> > As for tests, they seem to be mostly clean now. Andy, could you
> > investigate the few remaining ones -- probably just adding
> > 'expected' markup?
>
> I believe this to be true.  I will look into them again tonight and
> likely mark them as 'expected'.

I updated the documentation (added the markup - thank you, and
reorganized).  I also marked all the tests on a few platforms as
expected failures (I hope I did it right).

I don't know what is wrong with the tests for sun-5.10
(http://tinyurl.com/yeuelll).

>
> >
> > - Volodya
>
> Regards,
> Andy Tompkins

(Continue reading)

John Maddock | 1 Jan 18:05
Picon

Re: bcp update #2: namespace renaming

> Indeed this is a problem, but I also remember that not only namespace are
> relevant.
>
> In some older versions of boost I remember (I think in boot_thread 1.35)
> some function had names like:
>
> extern "C" boost_thread_some_callback_functions
>
> Were used, also, if at some point shared object/dll dynamic loading
> would be added they may use resolveable points like
>
> extern "C" boost_foobar_resolvable_sybol.
>
> My be added, outside boost namespace in order be loaded with
> dlsym/GetProcAddress.
>
> I suggest different approach I used in my namespace renaming
> script:
>
> http://art-blog.no-ip.info/files/rename.py
>
> I had taken each tocken and substituted boost -> newnamespace and
> BOOST -> NEWNAMESPACE
>
> Also I required rename directories as well.
> This approach is free from the above error that could happen.
>
> If some symbol would be missed it may cause symbol collapse and
> some wired bugs when using 2 versions boost in same program,
> shared object.
(Continue reading)

ch.asad@gmail.com | 1 Jan 18:16
Picon

Can any one help me with this fstream


Hi i am new to boost. i have written a code. can any one guide me whats the
issue with this code.

It gives an error when I assign the File pointer to a Global poiter.
"
			h_file = file; 
			h_str  = str;
"

Can any one guide me whats the issue with this and how cna i solve this
issue.

thanks,
Asad

// Accelor-test.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <string>
#include <fstream>
#include <string>
#include <vector>
#include <iostream>
#include <iterator>
#include <functional>
#include <boost/asio.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/find_iterator.hpp>
(Continue reading)

Maurizio Vitale | 1 Jan 19:45
Favicon

Re: bcp update #2: namespace renaming

>>>>> "John" == John Maddock <john <at> johnmaddock.co.uk> writes:

    John> Obviously these could be renamed as special cases easily
    John> enough... but maintaining a manual list of API's to rename is
    John> a maintainance nightmare.

    John> Any better ideas?

wouldn't running nm on non-renamed boostlibs end grepping for visible text
and data symbol give you a good list?

Best regards,

     Maurizio
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane