Re: How to use the qr decomposition correctly?

PB <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CACA1MsTnVYvsXz-SM=232U_4mQXuT1_8j8YA01D=1toezd0Qcw@mail.gmail.com>
> Compiling this code gives an error from lapack:
>
> Error 1 error C2589: '(' : illegal token on right side of '::'
> d:\3rd\include\boost\numeric\bindings\lapack\ormqr.hpp 189
>
>  traits::detail::array<value_type> work( std::max(1,n_w*32) );
>
>
My guess is you're hitting the problem where MSVC's Windows include files
have a #define for max, so the compiler is treating the token 'max' as a
macro. One solution is to put parethenses around std::max:

(std::max)(1,n_w*32)

Pete
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.