
I have a bunch of code that uses loki. I am trying to convert it to use boost instead. However, I am having a very difficult time finding concepts in boost to replace those in loki. I have looked for something to help in this, but I have not had much success. I have read through the MP documentation, and I am even more confused. For example, I use Loki::Int2Type, and according to a loose interpretation of section 2.3.6, mpl::int_c<> may be what I am looking for (at least for this one specific case). However, when I went to look at the source to make sure it does what I think it does, I could not find it anywhere. I have 1.31.0, extracted from the tar.gz file, and did a complete find, but the only place I can find reference to it is in .sgml files. Anyone know what this became, or how to correct my brain-dedness? shandalle:jody> md5sum boost_1_31_0.tar.gz c19ed169de6e76de91f2a1602fb1c688 boost_1_31_0.tar.gz shandalle:jody> find . | xargs egrep 'int_c[:space:]*<' ./libs/mpl/doc/paper/src/lambda.sgml: mpl::less< mpl::sizeof_<_1>, mpl::int_c<16> > ./libs/mpl/doc/paper/src/lambda.sgml: , mpl::int_c<16> ./libs/mpl/doc/paper/src/lambda.sgml: , mpl::bind< mpl::less<>, mpl::bind<mpl::sizeof_<>,_1>, mpl::int_c<16> > ./libs/mpl/doc/paper/src/lambda.sgml: mpl::less< mpl::sizeof_<_>,mpl::int_c<16> > ./libs/mpl/doc/paper/src/lambda.sgml: mpl::less< mpl::sizeof_<_>,mpl::int_c<16> > ./libs/mpl/doc/paper/src/lambda.sgml: mpl::less< mpl::sizeof_<_>,mpl::int_c<16> > ./libs/mpl/doc/paper/src/sequences.sgml: mpl::int_c<1> ./libs/mpl/doc/paper/src/sequences.sgml: , mpl::int_c<2> ./libs/mpl/doc/paper/src/sequences.sgml: , mpl::int_c<3> ./libs/mpl/doc/paper/src/sequences.sgml: , mpl::int_c<4> ./libs/mpl/doc/paper/src/sequences.sgml: , mpl::int_c<5> ./libs/mpl/doc/src/howtos.sgml:typedef mpl::lower_bound<types, mpl::int_c<5>, mpl::less<_1,_2> >::type iterator; ./libs/mpl/doc/src/howtos.sgml:typedef mpl::upper_bound<types, mpl::int_c<5>, mpl::less<_1,_2> >::type iterator; ./libs/mpl/doc/src/howtos.sgml:typedef mpl::binary_search<types, mpl::int_c<5>, mpl::less<_1,_2> >::type iterator; -- Jody Hagins What did Mickey Mouse get for Christmas? A Dan Quayle watch. -- heard from a Mike Dukakis field worker

Jody Hagins wrote:
I have a bunch of code that uses loki. I am trying to convert it to use boost instead. However, I am having a very difficult time finding concepts in boost to replace those in loki. I have looked for something to help in this, but I have not had much success. I have read through the MP documentation, and I am even more confused.
Asking specific questions on this list might be of some help.
For example, I use Loki::Int2Type, and according to a loose interpretation of section 2.3.6, mpl::int_c<> may be what I am looking for (at least for this one specific case).
Yep, expect that it's called 'mpl::int_' now (http://tinyurl.com/2lhz2). The paper needs updating :(, sorry about that. HTH, -- Aleksey Gurtovoy MetaCommunications Engineering

On Fri, 20 Feb 2004 12:48:14 -0600 Aleksey Gurtovoy <agurtovoy@meta-comm.com> wrote:
Asking specific questions on this list might be of some help.
I don't want to use up my "stupid question" credits all at once ;-)
Yep, expect that it's called 'mpl::int_' now (http://tinyurl.com/2lhz2). The paper needs updating :(, sorry about that.
Thanks, I found it now!

On Fri, Feb 20, 2004 at 01:21:06PM -0500, Jody Hagins wrote:
I have a bunch of code that uses loki. I am trying to convert it to use boost instead. However, I am having a very difficult time finding concepts in boost to replace those in loki. I have looked for something to help in this, but I have not had much success. I have read through the MP documentation, and I am even more confused.
For example, I use Loki::Int2Type, and according to a loose interpretation of section 2.3.6, mpl::int_c<> may be what I am looking for (at least for this one specific case). However, when I went to look at the source to make sure it does what I think it does, I could not find it anywhere. I have 1.31.0, extracted from the tar.gz file, and did a complete find, but the only place I can find reference to it is in .sgml files.
Anyone know what this became, or how to correct my brain-dedness?
shandalle:jody> find . | xargs egrep 'int_c[:space:]*<'
I think the problem is that much Boost library code is preprocessor-generated. Maybe doing // foo.cpp #include "boost/mpl/int.hpp" and then trying gcc -E foo.cpp will help you find the code you seek. (I haven't actually tried.) -- -Brian McNamara (lorgon@cc.gatech.edu)

Brian McNamara <lorgon@cc.gatech.edu> writes:
On Fri, Feb 20, 2004 at 01:21:06PM -0500, Jody Hagins wrote:
I have a bunch of code that uses loki. I am trying to convert it to use boost instead. However, I am having a very difficult time finding concepts in boost to replace those in loki. I have looked for something to help in this, but I have not had much success. I have read through the MP documentation, and I am even more confused.
For example, I use Loki::Int2Type, and according to a loose interpretation of section 2.3.6, mpl::int_c<> may be what I am looking for (at least for this one specific case). However, when I went to look at the source to make sure it does what I think it does, I could not find it anywhere. I have 1.31.0, extracted from the tar.gz file, and did a complete find, but the only place I can find reference to it is in .sgml files.
Anyone know what this became, or how to correct my brain-dedness?
shandalle:jody> find . | xargs egrep 'int_c[:space:]*<'
I think the problem is that much Boost library code is preprocessor-generated.
Maybe doing // foo.cpp #include "boost/mpl/int.hpp" and then trying gcc -E foo.cpp will help you find the code you seek. (I haven't actually tried.)
There are pre-generated headers in boost/mpl/aux_/preprocessed/... Those are the ones that actually get used. -- Dave Abrahams Boost Consulting www.boost-consulting.com

On Fri, 20 Feb 2004 16:09:56 -0500, David Abrahams <dave@boost-consulting.com> wrote:
There are pre-generated headers in boost/mpl/aux_/preprocessed/... Those are the ones that actually get used.
What generates these files? We use the preprocessor library for boiler plate code here and there and find it very useful. But one of the critisms voiced is that debugging the generated code is difficult->impossible (all debug info points at the same line in the code!). What we really want is a way of preprocessing the code as a separate stage in the build process. We could (and occasionally do) output the preprocessed files, but that means all of the headers are pulled in, and all of the comments stripped out. I imagine this is not an uncommon case. TIA Sam

Sam Partington wrote:
On Fri, 20 Feb 2004 16:09:56 -0500, David Abrahams <dave@boost-consulting.com> wrote:
There are pre-generated headers in boost/mpl/aux_/preprocessed/... Those are the ones that actually get used.
What generates these files? We use the preprocessor library for boiler plate code here and there and find it very useful.
But one of the critisms voiced is that debugging the generated code is difficult->impossible (all debug info points at the same line in the code!). What we really want is a way of preprocessing the code as a separate stage in the build process.
We could (and occasionally do) output the preprocessed files, but that means all of the headers are pulled in, and all of the comments stripped out.
If you need or would like to debug your preprocessing code you may want to have a look at the tracing capabilities provided by the Wave preprocessor. It allows you to get a very dedicated macro expansion trace of a certain macro, which allows to track down nasty pp problems (and BTW is very educational, what actually is going on inside the Boost.PP library). Regards Hartmut

Sam Partington <Sam.Partington@metagence.com> writes:
On Fri, 20 Feb 2004 16:09:56 -0500, David Abrahams <dave@boost-consulting.com> wrote:
There are pre-generated headers in boost/mpl/aux_/preprocessed/... Those are the ones that actually get used.
What generates these files? We use the preprocessor library for boiler plate code here and there and find it very useful.
The preprocessor library generates them, with a little help from friends. See the contents of libs/mpl/preprocessed/ in your boost installation. -- Dave Abrahams Boost Consulting www.boost-consulting.com

[mailto:boost-bounces@lists.boost.org] On Behalf Of Sam Partington
But one of the critisms voiced is that debugging the generated code is difficult->impossible (all debug info points at the same line in the code!).
This is why the iteration mechanisms exist. What kind of code are you generating? Regards, Paul Mensonides
participants (7)
-
Aleksey Gurtovoy
-
Brian McNamara
-
David Abrahams
-
hartmutkaiser@t-online.de
-
Jody Hagins
-
Paul Mensonides
-
Sam Partington