voikko / corevoikko

Libvoikko and essential linguistic resources
Other
89 stars 25 forks source link

Fixes for building with clang #22

Closed osimola closed 8 years ago

osimola commented 8 years ago
hatapitk commented 8 years ago

Thanks! However I'm wondering which version of clang you are using? Because constexpr should be allowed here and it would ensure that this lookup table would really be optimized as compile time constant. It worked for me (with Clang 3.7).

osimola commented 8 years ago

You are right, constexpr works here. The problem was single braces around initializer list which somehow caused another error message about constexpr.

I have Clang 3.4 on Linux and Apple LLVM 7.0.2 on Mac, no idea which upstream LLVM version the latter is based on.

UPDATE: Clang 3.4 is fine with single braces around std::array initializer list. XCode Clang does not understand single braces and complains about constexpr if there is constexpr and single braces.