tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.49k stars 418 forks source link

Syntax error: missing ')' before identifier #516

Closed SimonXU48 closed 4 years ago

SimonXU48 commented 4 years ago

The code looks fine to me but somehow visual studio 2015 sees it as an error.

Here is the code: (in numeric.hpp line 49) template <typename NumberL, typename NumberR> constexpr typename std::common_type<NumberL, NumberR>::type max(NumberL lval, NumberR rval) { return (lval < rval) ? rval : lval; }

And here are the error messages: syntax error: missing ')' before identifier 'lval' 'NumberL': redefinition; previous definition was 'template parameter' note: see declaration of 'NumberL'

Could this be a visual studio 2015 bug?

majianwei0705 commented 4 years ago

see https://github.com/tfussell/xlnt/issues/431

SimonXU48 commented 4 years ago

see #431

Thanks!