Boost logo

Boost Users :

Subject: [Boost-users] CUDA and Boost
From: Víctor Felipe (vjfn1990_at_[hidden])
Date: 2013-08-29 17:33:40


Hey guys!

I have been using Boost inside a Visual C++ CUDA project. I'm using
"regex.hpp" inside a ".cu" file and it works fine including it this way:
"#include < boost / regex.hpp >". Now, I need to use "abs.hpp", which I'm
including this way: "#include < boost / ratio / detail / mpl / abs.hpp >"
and it fails while compiling. I'm using Windows 8 64-bits, Visual Studio
2012, Boost 1.53.0 and CUDA 5.5.

I get this error only by putting this in my code: "#include < boost / ratio
/ detail / mpl / abs.hpp >" without using more instructions related with
Boost. I have several ".cpp" and ".cu" files in my project. If I put that
include in a ".cpp" file, it compiles fine. If I put that include in a
".cu", this error appear:

1>C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\boost/ratio/detail/mpl/abs.hpp(68): error C2675: unary '-'
: 'T' does not define this operator or a conversion to a type acceptable to
the predefined operator

Thanks for any help you can provide and sorry for my English, it's not my
native language!



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net