bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.46k stars 581 forks source link

Mapping C++ constexpr with Java ConstExpr Annotation Library #409

Open eix128 opened 4 years ago

eix128 commented 4 years ago

There is new library called constexpr-java. As i see , currently javacpp doesnt support constexpr. But you can add support with this library : https://github.com/junkdog/constexpr-java

saudet commented 3 years ago

BTW, JavaCPP does support constexpr. It just considers them as normal functions and (immutable) variables, and lets the C++ compiler deal with them. If you encounter bugs related to that though, please let me know.

eix128 commented 3 years ago

Yeah , but this solution i gave you is faster solution then runtime solution. Java ConstExpr does all pre calculations for you