[context] Providing template class enumerate in context.hpp

Hi all, I am trying to use the newly accepted boost.context and I am wondering why something as useful as the template enumerate is not diretly given when including "context.hpp" and not even in a separate header. Since it's in the doc it would be a good addition IMHO. Thanks, Julien PS: the link to boost.context doc is broken and the git repos seems to have moved.

Hi Julien,
I am trying to use the newly accepted boost.context and I am wondering why something as useful as the template enumerate is not diretly given when including "context.hpp" and not even in a separate header.
you referring to the example 'enumerate'?! it was intendet to demonstrate the usage of boost.context. maybe I'll provide an separate lib with the 'enumerate' stuff if appropriate. Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

you referring to the example 'enumerate'?! it was intendet to demonstrate the usage of boost.context. maybe I'll provide an separate lib with the 'enumerate' stuff if appropriate.
Yes I am. Having played a tiny bit with C#, it's the first thing I wanted to try. Not related, I have problems linking with boost.context on MSVC 10, 32 bits when trying to compile the example folder using bjam :
test_context.obj : error LNK2019: unresolved external symbol _boost_fcontext_jum p referenced in function "public: int __thiscall boost::contexts::detail::contex t_base::suspend(int)" ( ?suspend@context_base@detail@contexts@boost@@QAEHH@Z) libboost_context-vc100-mt-gd-1_49.lib(fcontext.obj) : error LNK2001: unresolved external symbol _boost_fcontext_jump
Finally, have you considered adding auto linking ? I guess that can be done easily using the following code in context.hpp: #define BOOST_LIB_NAME "context" #include <boost/config/auto_link.hpp> Thanks for your efforts, Julien

Not related, I have problems linking with boost.context on MSVC 10, 32 bits when trying to compile the example folder using bjam :
test_context.obj : error LNK2019: unresolved external symbol _boost_fcontext_jum p referenced in function "public: int __thiscall boost::contexts::detail::contex t_base::suspend(int)" ( ?suspend@context_base@detail@contexts@boost@@QAEHH@Z) libboost_context-vc100-mt-gd-1_49.lib(fcontext.obj) : error LNK2001: unresolved external symbol _boost_fcontext_jump because examples link dynamically libboost_context - you can add the
Am 28.02.2012 14:37, schrieb Julien Nitard: directory containing the libs to your search path or you update to boost-trunk (changed to link statically)
Finally, have you considered adding auto linking ? I guess that can be done easily using the following code in context.hpp:
#define BOOST_LIB_NAME "context" #include<boost/config/auto_link.hpp>
yes - already used Oliver

[...]
because examples link dynamically libboost_context - you can add the
directory containing the libs to your search path or you update to boost-trunk (changed to link statically)
I have tried with boost trunk, the result is the same, nothing links, (except echo_client.exe). After analysis of the logs I think the problem is that the build system can't detect my system properties properly: next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <target-os>windows not matched My system may have two catches: first the OS is in chinese and I have a 32 bit OS with a 64 bit CPU. I am using MSVC 10 express edition. I'll try to dig in the build system to see if I can find how the matching is done. Julien

I have tried with boost trunk, the result is the same, nothing links, (except echo_client.exe).
After analysis of the logs I think the problem is that the build system can't detect my system properties properly:
next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <target-os>windows not matched
My system may have two catches: first the OS is in chinese and I have a 32 bit OS with a 64 bit CPU. I am using MSVC 10 express edition.
I'll try to dig in the build system to see if I can find how the matching is done.
unfortunately boost.build doesn't set values for the required build properties (only for default-properties). I'll would try following: bjam toolset=msvc-10.0 architecture=x86 instruction-set=i386 address-model=32 Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

On Thu, Mar 1, 2012 at 1:06 AM, Oliver Kowalke <oliver.kowalke@gmx.de>wrote:
I have tried with boost trunk, the result is the same, nothing links, (except echo_client.exe).
After analysis of the logs I think the problem is that the build system can't detect my system properties properly:
next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <target-os>windows not matched
My system may have two catches: first the OS is in chinese and I have a 32 bit OS with a 64 bit CPU. I am using MSVC 10 express edition.
I'll try to dig in the build system to see if I can find how the matching is done.
unfortunately boost.build doesn't set values for the required build properties (only for default-properties).
I'll would try following:
bjam toolset=msvc-10.0 architecture=x86 instruction-set=i386 address-model=32
Oliver
Yep, I had the same problem when trying to use the Context library and I solved it by using a command line similar to the above. Only difference is that I found I didn't need to specify the instruction set, only the architecture and address-model.

Am 29.02.2012 18:21, schrieb Joshua Boyce:
On Thu, Mar 1, 2012 at 1:06 AM, Oliver Kowalke<oliver.kowalke@gmx.de>wrote:
I have tried with boost trunk, the result is the same, nothing links, (except echo_client.exe).
After analysis of the logs I think the problem is that the build system can't detect my system properties properly:
next alternative: required properties:<abi>ms<address-model>32 <architecture>x86<binary-format>pe<target-os>windows not matched
My system may have two catches: first the OS is in chinese and I have a 32 bit OS with a 64 bit CPU. I am using MSVC 10 express edition.
I'll try to dig in the build system to see if I can find how the matching is done. unfortunately boost.build doesn't set values for the required build properties (only for default-properties).
I'll would try following:
bjam toolset=msvc-10.0 architecture=x86 instruction-set=i386 address-model=32
Oliver
the command line option are described at http://ok73.ok.funpic.de/boost/libs/context/doc/html/context/installtion.htm... the issue results from a limitation of boost.build (default/non-default properties) as already described Oliver

Hi
the command line option are described at http://ok73.ok.funpic.de/** boost/libs/context/doc/html/**context/installtion.html<http://ok73.ok.funpic.de/boost/libs/context/doc/html/context/installtion.html> the issue results from a limitation of boost.build (default/non-default properties) as already described
First, thanks, that worked for me. One small issue: the link above doesn't work for me (connection error). Is there any plan to upgrade boost.build to change/repair that ? A quick search inthe mail archive didn't bring significant results on that topic. This is a much required change IMHO. Julien

http://ok73.ok.funpic.de/boost/libs/context/doc/html/context/installtion.htm...
First, thanks, that worked for me. One small issue: the link above doesn't work for me (connection error).
works for me?!
Is there any plan to upgrade boost.build to change/repair that ? A quick search inthe mail archive didn't bring significant results on that topic. This is a much required change IMHO.
Until the boost.build developers do provide the required boost.build props (like architecture, address-modell, ... as default boost.build properties) you are forced to specify them on bjam command line. Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

AMDG On 02/29/2012 10:43 PM, Oliver Kowalke wrote:
http://ok73.ok.funpic.de/boost/libs/context/doc/html/context/installtion.htm...
First, thanks, that worked for me. One small issue: the link above doesn't work for me (connection error).
works for me?!
Is there any plan to upgrade boost.build to change/repair that ? A quick search inthe mail archive didn't bring significant results on that topic. This is a much required change IMHO.
Until the boost.build developers do provide the required boost.build props (like architecture, address-modell, ... as default boost.build properties) you are forced to specify them on bjam command line.
Pending a real fix, I just committed a fix to improve the error message. In Christ, Steven Watanabe

2012/2/28 Julien Nitard <julien.nitard@m4tp.org>
you referring to the example 'enumerate'?! it was intendet to demonstrate the usage of boost.context. maybe I'll provide an separate lib with the 'enumerate' stuff if appropriate.
Yes I am. Having played a tiny bit with C#, it's the first thing I wanted to try.
FYI, I've started a project here: https://github.com/jamboree/boost.enumerator/tree/header-only But it lacks docs and examples, you can refer to only the test for now...

Hi,
FYI, I've started a project here: https://github.com/jamboree/boost.enumerator/tree/header-only
But it lacks docs and examples, you can refer to only the test for now...
I'll have a look, thanks. Like this it looks interesting because the first thing I did was implement an iterator over "enumerator" and it seems you provide it out of the box. Julien

Am 04.03.2012 14:51, schrieb Julien Nitard:
Hi,
FYI, I've started a project here: https://github.com/jamboree/boost.enumerator/tree/header-only
But it lacks docs and examples, you can refer to only the test for now...
I'll have a look, thanks. Like this it looks interesting because the first thing I did was implement an iterator over "enumerator" and it seems you provide it out of the box.
Julien
_______________________________________________ Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
a iterator is copyable - but a context is not so take care that you prevent copy it. Oliver

Hi again, you referring to the example 'enumerate'?! it was intendet to demonstrate
the usage of boost.context. maybe I'll provide an separate lib with the 'enumerate' stuff if appropriate.
I think I have found a bug in the sample. In the destructor, I get a "calling virtual function exception" for Enumerator that are never started. The following code seems to work:
if (started_) if ( do_unwind_ && ! ctx_.is_complete() ) ctx_.unwind_stack();
Julien
participants (5)
-
Joshua Boyce
-
Julien Nitard
-
Oliver Kowalke
-
Steven Watanabe
-
TONGARI