Peter Dimov | 1 Mar 01:19

Re: error when using boost with visual c++

Sean Farrow:

> Hi:
> Yes I changed the projects calling convension to stdcall.

It seems that lines 59, 60, 61, 71 and 72 in interlocked.hpp should not have 
__cdecl (but 57 and 58 do need it). You may try removing the __cdecl from 
these lines in your local copy of Boost and see if it helps. 
Peter Dimov | 1 Mar 01:22

Re: shared_ptr memory leak 2

gast128:

> The case seems entered by Peter Dimov as bug entry:
> 
> https://svn.boost.org/trac/boost/ticket/2813

Yes, I consider this a bug. This is the test I've come up with:

#include <boost/shared_ptr.hpp>
#include <boost/detail/lightweight_test.hpp>

class X
{
public:

    static int instances;

    X()
    {
        ++instances;
    }

    ~X()
    {
        --instances;
    }

private:

    X( X const& );
(Continue reading)

er | 1 Mar 03:02
Picon

Re: [result_of] member function

Steven Watanabe wrote:
> AMDG
> 
> er wrote:
>> Is this feasible? How?
>>
>>     class Foo
>>     {
>>         template<typename Signature>
>>         struct result{};
>>
>>         template<typename F>
>>         struct result<(F::*f)(value_type)>{
>>             typedef
>>         value0_type if f == foo,
>>             value1_type if f == bar           type;
>>         };
>>
>>     value0_type foo(value_type);
>>     value1_type bar(value_type);
>>
>>     };
>>
>> How do I invoke result_of to get the result type of F::foo(value_type)?
> 
> This is not what boost::result_of is for.
> 
> In Christ,
> Steven Watanabe
Thak you for your answer. I was probably misinterpreting the part that reads
(Continue reading)

er | 1 Mar 03:06
Picon

Re: Having a tough time installing and setting up Boost and associated libraries

ajay gopalakrishnan wrote:
> don't have root privileges.
> 2. There is a wrapper called Boost Numerics Package written and hosted 
> at http://mathema.tician.de/software/boost-bindings. I want to be able 
> to use this also. This allows me to use ATLAS, BLAS in Boost.
> 

If you search for ATLAS in the ublas mailing list you are likely to find 
questions that newcomers have as I did a while back.
Steven Watanabe | 1 Mar 03:14
Picon

Re: [result_of] member function

AMDG

er wrote:
> Thak you for your answer. I was probably misinterpreting the part that 
> reads
>
> The implementation permits the type F to be a function pointer, 
> function reference, member function pointer, or class type.
>
>
> in the doc of result_of. Is someone aware of an example that 
> illustrates the "member function pointer" part?

It works like this:

struct S {
    int f(int);
}
typedef int (S::*f_type)(int);
typedef boost::result_of<f_type(S*, int)>::type f_result_type;

Note that this is not very useful if you want to deduce the return
type of the function named f in some arbitrary class, because you
need to know the type of the member function pointer to
use result_of.

In Christ,
Steven Watanabe
Steven Watanabe | 1 Mar 03:25
Picon

Re: Having a tough time installing and setting up Boost and associated libraries

AMDG

ajay gopalakrishnan wrote:
> I am a newbie when it comes to using boost. My primary motivation 
> behind using boost is that I want to use the Text processing, 
> Numerical computing facilities together in one common language.
> Boost Regex, Spriti and The BLas Libraries would serve my purpose.
>
> However, I am having a tough time installing and running it. I am not 
> able to find any good documentation for using this.
> My requirement is this:
> 1. I want to be able to install Boost locally in my Unix account. I 
> don't have root privileges.

Have you seen
http://www.boost.org/more/getting_started/unix-variants.html
?

In Christ,
Steven Watanabe
Eric Niebler | 1 Mar 03:33
Picon
Favicon

Re: proto: analytical-only math functions

Hicham Mouline wrote:
> 
> Hello,
> I pasted the code I have so far in
> http://codepad.org/gk9KoR31
> a really cool tool indeed.
> 

<snip>

> 
> My questions (please refer to the code):
> 

<snip>

Hi Hicham,

First let me apologize for not answering your questions the first time 
you posted them. I thought, "That's a lot of questions. I'll get to it 
when I have time." And I just haven't. Some of your questions are easy, 
though, so I'll give you some tips and get to the rest as time allows.

proto::_ can only match types, not non-type template parameters, so you 
need to change constant_tag to take an MPL Integral Constant.

The first parameter to proto::extends must be an expression type, so on 
line 47, you should probably have "typename 
proto::terminal<constant_tag<subscript> >::type", or something.

(Continue reading)

er | 1 Mar 07:19
Picon

[boost] compose ArgumentPacks using a comma

Hi All,

I have a structure containing a fusion sequence which is constructed 
recursively.

BOOST_PARAMETER_KEYWORD(tag,kwd_struct)

// This element depends on others, hence fetches the structure
elem_x(const Args& args){ ...args[kwd_struct]...; }

structure(Args const& args)
:elements_(
   make_elements(
     ((kwd_struct = (*this)),args)
   )
)
{};

error: in constructor elem_x(const Args&) [with Args = ...]
no match for operator[] in args[kwd_struct]

If I reverse the order of the arguments
     (args,(kwd_struct = (*this)))
it compiles.

Why the discrepancy?
邹磊 | 1 Mar 07:24
Picon
Favicon

Re: Some question about cross-compiling boost


Hi,Volodya.
I'm sorry to trouble you again. At your last respond you suggested me to quote the error message from the
compiler. I got the message as following:

...patience...
...found 11853 targets...
...updating 10 targets...
gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi/xml_grammar.o
In file included from libs/serialization/src/basic_xml_grammar.ipp:22,
                 from libs/serialization/src/xml_grammar.cpp:63:
./boost/spirit/core/primitives/numerics.hpp:122: error: declaration of `template<class
ScannerT> struct boost::spirit::sign_parser::result'
./boost/spirit/core/parser.hpp:123: error: conflicts with previous declaration `template<class
ScannerT> struct boost::spirit::parser<boost::spirit::sign_parser>::result'

    "/opt/SEED_DVS357-SDK/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-g++" 
-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -fPIC -pthread 
-DBOOST_ALL_NO_LIB=1 -DBOOST_SERIALIZATION_DYN_LINK=1 -DNDEBUG  -I"." -c -o
"bin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi/xml_grammar.o" "libs/serialization/src/xml_grammar.cpp"

...failed gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi/xml_grammar.o...
...skipped
<pbin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi>libboost_serialization-gcc34-mt-1_35.so.1.35.0
for lack of <pbin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi>xml_grammar.o...
...skipped <p/usr/local/lib/boost_1_35_0>libboost_serialization-gcc34-mt-1_35.so.1.35.0 for
lack of <pbin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi>libboost_serialization-gcc34-mt-1_35.so.1.35.0...
...skipped <p/usr/local/lib/boost_1_35_0>libboost_serialization-gcc34-mt.so for lack of <p/usr/local/lib/boost_1_35_0>libboost_serialization-gcc34-mt-1_35.so.1.35.0...
gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi/xml_wgrammar.o
In file included from libs/serialization/src/basic_xml_grammar.ipp:22,
(Continue reading)

Vladimir Prus | 1 Mar 09:02

Re: Some question about cross-compiling boost

邹磊 wrote:

> 
> Hi,Volodya.
> I'm sorry to trouble you again. At your last respond you suggested me to quote the error message
> from the compiler. I got the message as following:
> 
> ...patience...
> ...found 11853 targets...
> ...updating 10 targets...
> gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.4.3/release/threading-multi/xml_grammar.o
> In file included from libs/serialization/src/basic_xml_grammar.ipp:22,
>                  from libs/serialization/src/xml_grammar.cpp:63:
> ./boost/spirit/core/primitives/numerics.hpp:122: error: declaration of `template<class ScannerT>
> struct boost::spirit::sign_parser::result' ./boost/spirit/core/parser.hpp:123: error: conflicts
> with previous declaration `template<class ScannerT> struct
> boost::spirit::parser<boost::spirit::sign_parser>::result'
> 

This probably means your compiler is too old to handle Boost.Serialization use of Boost.Sprit.
No, I don't have any idea why a trivial task of parsing small subset of XML requires advanced
C++ support.

If you need Boost.Serialization library, try getting a newer compiler.

- Volodya

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
(Continue reading)


Gmane