Hello, Looking at the regression test results, it seems that some typeof tests do not compile on IBM. Did somebody have a look at this? Is this a known problem? Thanks, Karl
"Karl Meerbergen"
Looking at the regression test results, it seems that some typeof tests do not compile on IBM. Did somebody have a look at this? Is this a known problem?
Typeof is a new library, it has not been ported to IBM, and there are no immediate plans of doing this. But the native mode seems to mostly work, so you may want to use it for now, just define BOOST_TYPEOF_NATIVE. Regards, Arkadiy
Hi Arkadiy,
When BOOST_TYPEOF_NATIVE is defined, the following code does not
compile, and this is precisely what I want to do.
template
"Karl Meerbergen"
wrote Looking at the regression test results, it seems that some typeof tests do not compile on IBM. Did somebody have a look at this? Is this a known problem?
Typeof is a new library, it has not been ported to IBM, and there are no immediate plans of doing this. But the native mode seems to mostly work, so you may want to use it for now, just define BOOST_TYPEOF_NATIVE.
Regards, Arkadiy
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- ============================================== Look at our unique training program and Register on-line at http://www.fft.be/?id=35 ---------------------------------------------- Karl Meerbergen Free Field Technologies 16 place de l'Université B-1348 Louvain-la-Neuve - BELGIUM Company Phone: +32 10 45 12 26 Company Fax: +32 10 45 46 26 Mobile Phone: +32 474 26 66 59 Home Phone: +32 2 306 38 10 mailto:Karl.Meerbergen@fft.be http://www.fft.be ==============================================
"Karl Meerbergen"
When BOOST_TYPEOF_NATIVE is defined, the following code does not compile, and this is precisely what I want to do.
template
struct my_struct { typedef BOOST_TYPEOF_TPL( T1()+T2() ) type; };
What is the error message? Do you have the same problem if you use __typeof__ directly?
When BOOST_TYPEOF_NATIVE is not defined, including boost/typeof/std/complex.hpp produces the error message
typeof/std/complex.hpp", line 15.2: 1540-0130 (S) "BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR" is not declared.
Right, this is what regressions show. It fails to fully preprocess the text -- I would need the preprocessor output to start looking into this problem...
There might be a simple trick to avoid this problem? Thanks,
No, I doubt there is a simple solution :-( Regards, Arkadiy
Arkadiy Vertleyb wrote:
"Karl Meerbergen"
wrote When BOOST_TYPEOF_NATIVE is defined, the following code does not compile, and this is precisely what I want to do.
template
struct my_struct { typedef BOOST_TYPEOF_TPL( T1()+T2() ) type; }; What is the error message? Do you have the same problem if you use __typeof__ directly?
typeofsample.cpp", line 5.3: 1540-0132 (S) The expression must be a constant expression. Line 5 is: typedef BOOST_TYPEOF_TPL( T1()+T2() ) type; When I use __typeof__, I get the message: The text "+" is unexpected. When I do not define BOOST_TYPEOF_NATIVE, all works fine for integral and float and double types. It is a good basis to start for me, but I would have hoped to be able to get further. Thanks for your help. Karl
"Karl Meerbergen"
typedef BOOST_TYPEOF_TPL( T1()+T2() ) type;
When I use __typeof__, I get the message: The text "+" is unexpected.
I think it may be confusing a temporary object T1() with a function type -- __typeof__ usually handles both. As a wild guess, you can try to do something like: template<class T> T make(); typedef __typeof__(make<T1>()+make<T2>()) type;
When I do not define BOOST_TYPEOF_NATIVE, all works fine for integral and float and double types.
That means you can handle any custom class (after the registration). So the problem is only related to template registration, which makes it a little easier... Regards, Arkadiy
participants (2)
-
Arkadiy Vertleyb
-
Karl Meerbergen