Hi all. After reading about enable_if in CUJ I decided to see if this was present in boost, which it is, sort of, in function_base.hpp. However, it seems to exist in function::, and my impression is that its not really an official boost component. Is this correct ? Regards, Anders.
"Anders Moe"
Hi all. After reading about enable_if in CUJ I decided to see if this was present in boost, which it is, sort of, in function_base.hpp. However, it seems to exist in function::, and my impression is that its not really an official boost component. Is this correct ?
Yeah, I guess it's not in the public interface. We have a version in the new Sandbox iterators (adaptors) library, so it will be getting to be more entrenched. Really all that's required to make it official is documentation and tests. Would you like to volunteer? -- Dave Abrahams Boost Consulting www.boost-consulting.com
Hi again, and thanks for the reply.
I'd be happy to test it. The application in question is Geocap, a 3D
vizualization app for the geosciences, some examples of which can be found
here :
http://www.geocap.no/pages/geocap_ex_maps.html
Were mainly using
shared_ptr & co
mpl
static_assert & co
type_traits
on Gnu 3.x, MSVC 2003.
I'll do a boost-sandbox and look for it there.
Regards,
Anders Moe, Geocap.
----- Original Message -----
From: "David Abrahams"
"Anders Moe"
writes: Hi all. After reading about enable_if in CUJ I decided to see if this was present in boost, which it is, sort of, in function_base.hpp. However, it seems to exist in function::, and my impression is that its not really an official boost component. Is this correct ?
Yeah, I guess it's not in the public interface. We have a version in the new Sandbox iterators (adaptors) library, so it will be getting to be more entrenched. Really all that's required to make it official is documentation and tests. Would you like to volunteer?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sorry, I probably wasn't clear. By "documentation" I meant html pages
describing it that can go in the Boost distribution, and by "tests" I
meant a unit test program which we can integrate into the Boost
testing process to verify that enable_if works. The tests should not
involve "the application in question" ;-)
"Anders Moe"
Hi again, and thanks for the reply.
I'd be happy to test it. The application in question is Geocap, a 3D vizualization app for the geosciences, some examples of which can be found here :
http://www.geocap.no/pages/geocap_ex_maps.html
Were mainly using
shared_ptr & co mpl static_assert & co type_traits
on Gnu 3.x, MSVC 2003.
I'll do a boost-sandbox and look for it there.
Regards,
Anders Moe, Geocap.
----- Original Message ----- From: "David Abrahams"
Newsgroups: gmane.comp.lib.boost.user Sent: Tuesday, June 17, 2003 4:55 PM Subject: Re: enable_if part of boost ? "Anders Moe"
writes: Hi all. After reading about enable_if in CUJ I decided to see if this was present in boost, which it is, sort of, in function_base.hpp. However, it seems to exist in function::, and my impression is that its not really an official boost component. Is this correct ?
Yeah, I guess it's not in the public interface. We have a version in the new Sandbox iterators (adaptors) library, so it will be getting to be more entrenched. Really all that's required to make it official is documentation and tests. Would you like to volunteer?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
In our last exciting episode "Anders Moe" wrote:
<tt> <BR> Hi all. After reading about enable_if in CUJ I decided to see if this was<BR> present in boost, which it is, sort of, in function_base.hpp. However, it<BR> seems to exist in function::, and my impression is that its not really an<BR> official boost component. Is this correct ?<BR> <BR> Regards, Anders.<BR>
Hi all, Jeremiah Willcock and I are volunteering (if someone else wants to do it, scream stop now). Enable_if is most likely going to sit in the utility library. Jaakko Järvi
In article <16114.7174.507226.139791@damogran.osl.iu.edu>, Jaakko Jarvi
In our last exciting episode Howard Hinnant wrote:
Can we call it "restrict_to" ? :-)
The one who does the work gets to pick the name :) :) Seriously, the CUJ paper uses enable_if, so it may be good to stick with that, though I do not have a strong preference. We'll write the library using the name enable_if, and if the Boost community wants restrict_to or something else, we'll do a search replace through all the 10 lines of code :) Cheers, Jaakko
Hy all, I want to use bjam as build tool for my application. Therefore I have some specific questions about jam and bjam: 1) Suppose I want to compile all .cpp files in a particular directory, how do I tell bjam to do it ? Here are three question closely related: 2) Is there a way to modify the output tree hierarchy created by bjam ? 3) Is there a way to modify the output filename format. For example, bjam adds a "lib" to the lib projects. Is this customizable ? 4) Is it possible to tell bjam to compile projects and "centralize" binaries and lib in one single directory ? That's it for today. Any help appriciated. Jonathan. ----------------------------------------------------------------------------------- Jonathan de Halleux, Research Assistant Center for Systems Engineering and Applied Mechanics (CESAME) Universite catholique de Louvain Batiment Euler , Av. Georges Lemaitre, 4 Tel : +32-10-47 2595 B-1348 Louvain-la-Neuve Belgium E-mail : dehalleux@auto.ucl.ac.be -----------------------------------------------------------------------------------
In article <5.2.0.8.0.20030620132102.015221d0@mailhost.auto.ucl.ac.be>,
Jonathan de Halleux
Hy all,
I want to use bjam as build tool for my application. Therefore I have some specific questions about jam and bjam:
1) Suppose I want to compile all .cpp files in a particular directory, how do I tell bjam to do it ?
To get the CPP files of a directory you can: cpp-files = [ GLOB some/path : *.cpp ] ;
Here are three question closely related: 2) Is there a way to modify the output tree hierarchy created by bjam ?
Mostly no. You can shorten it if you define your own custom variants.
3) Is there a way to modify the output filename format. For example, bjam adds a "lib" to the lib projects. Is this customizable ?
For suffixes that is toolset and platform dependant. Some platforms only accept libs with specific endings. And others it's arbitrary but uses platform conventions. For prefixes it platform dependant in some cases. Arbitrary in others. Is it the suffix or prefix you want to change? They can be changed but I would discourage from doing that, it can have unforseen effects depending on the platform.
4) Is it possible to tell bjam to compile projects and "centralize" binaries and lib in one single directory ?
Yes. Look at the "stage" rule. It stages the targets you specify into a subdirectory, or subdirectories, of your choosing. -- -- grafik -- Don't Assume Anything
Hi Jonathan,
It's probably better to post your Boost.Build questions on the
jamboost list (cc:'d here).
Jonathan de Halleux
Hy all,
I want to use bjam as build tool for my application. Therefore I have some specific questions about jam and bjam:
1) Suppose I want to compile all .cpp files in a particular directory, how do I tell bjam to do it ?
There's a built-in rule called GLOB which can, well, glob. Putting [ GLOB $(directory) : *.cpp ] in your list of sources should work.
Here are three question closely related: 2) Is there a way to modify the output tree hierarchy created by bjam ?
You can set ALL_LOCATE_TARGET to change the root. Otherwise, no.
3) Is there a way to modify the output filename format. For example, bjam adds a "lib" to the lib projects. Is this customizable ?
Rene? I think you're the one to address this...
4) Is it possible to tell bjam to compile projects and "centralize" binaries and lib in one single directory ?
You can use the 'stage' rule. See http://www.boost.org/tools/build/build_system.htm#stage_targets. -- Dave Abrahams Boost Consulting www.boost-consulting.com
Jaakko Jarvi
In our last exciting episode Howard Hinnant wrote:
Can we call it "restrict_to" ? :-)
The one who does the work gets to pick the name :) :) Seriously, the CUJ paper uses enable_if, so it may be good to stick with that, though I do not have a strong preference.
We'll write the library using the name enable_if, and if the Boost community wants restrict_to or something else, we'll do a search replace through all the 10 lines of code :)
I've seen a few other names for this in use, but none has the currency of enable_if, which is becoming generally known as the major "brand-name" behind SFINAE. Though other names may be more technically accurate, I say stick with what's recognized. -- Dave Abrahams Boost Consulting www.boost-consulting.com
In article <16114.31427.407042.52724@damogran.osl.iu.edu>, Jaakko Jarvi
Howard Hinnant
In article <16114.31427.407042.52724@damogran.osl.iu.edu>, Jaakko Jarvi
wrote: | We'll write the library using the name enable_if, and if the Boost | community wants restrict_to or something else, we'll do a search | replace through all the 10 lines of code :)
But restrict_to only takes five lines! :-)
Ok, enough kidding around. enable_if has my vote (of course). Might be nice if the docs demonstrate its use with member template constructors (as opposed to just namespace scope functions).
And with partial specializations, too, of course! -- Dave Abrahams Boost Consulting www.boost-consulting.com
From: "Howard Hinnant"
Might be nice if the docs demonstrate its use with member template constructors (as opposed to just namespace scope functions).
And conversion functions, perhaps: template<class T> class test { public: operator typename enable_if< boost::is_arithmetic<T>::value, T
::type() { return T(); } };
Assuming this is valid C++. :) Regards, Terje
From: "Terje Slettebø"
From: "Howard Hinnant"
Might be nice if the docs demonstrate its use with member template constructors (as opposed to just namespace scope functions).
And conversion functions, perhaps:
Granted, this doesn't appear use SFINAE, though, so maybe leave it out. On
the other hand, does constructors? I get the same kind of error message for
both constructors and conversion operators, on both Intel C++ and g++:
template<class T>
class test
{
public:
test(const T &,
typename enable_if<
is_arithmetic<T>::value,
T
>::type * = 0) {}
};
test a(1); // Ok
test b(0 (int *) 0); // error: class "enable_if
In article <3fc901c337d4$5821a420$8d6c6f50@pc>, Terje Slettebø
participants (8)
-
Anders Moe
-
Anders Moe
-
David Abrahams
-
Howard Hinnant
-
Jaakko Jarvi
-
Jonathan de Halleux
-
Rene Rivera
-
Terje Slettebø