Boost logo

Ublas :

Subject: Re: [ublas] [bindings] Use of fortran_int_t
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-07-15 04:12:16

On Wed, Jul 14, 2010 at 8:52 PM, Rutger ter Borg <rutger_at_[hidden]> wrote:
> Marco Guazzone wrote:
> [snip]
>> So is it safe to include "detail/config/fortran.hpp" in client code?
>> The adjective "safe" is to be intended as "stable" since this include
>> is in the "detail" part of the library and hence possibly subjected to
>> changes.
> [snip]
> I guess this will be a recurring question / theme. Perhaps we could
> introduce traits for it? If so, what would be a good name / interface? We
> could then add it to the bindings tld.

Maybe, something like

namespace lapack {

typedef ::fortran_int_t int_t;
typedef ::logical_t logical_t;

} // lapack

may be a good start.

For instance, this would results in:

    bindings::lapack::int_t n(1);
    bindings::lapack::logical_t* ptr_log(0);

Obviously, this solution implies that each lib binding will define
each set of types, according to the ones used by the bound lib.
But this, IMHO, could make sense.


-- Marco