Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows stringer.h error while compiling #12

Open
jcarcamo opened this issue Mar 10, 2017 · 0 comments
Open

Windows stringer.h error while compiling #12

jcarcamo opened this issue Mar 10, 2017 · 0 comments

Comments

@jcarcamo
Copy link

Hi there,
First of all I want to thank you for this library it's really easy to use and incorporate into C++ projects. I've already tested it in Linux and OSx and it works as described. However in windows I found that when adding the library in a visual studio project (adding the downloaded project folder to the include directories) at compiling time it shows C2589 Errors (12) and C4003 Warnings (6) at lines:

			T imin = std::numeric_limits<T>::min();
			T imax = std::numeric_limits<T>::max();

from DoubleConverter::Convert, part of stringer.h

As usual googling the problem I found the following StackOverflow solution warning C4003 and errors C2589 and C2059 on: x = std::numeric_limits::max()

I opted to include this as a workaround:

#ifdef _MSC_VER
			T imin = (std::numeric_limits<T>::min)();
			T imax = (std::numeric_limits<T>::max)();
#else
			T imin = std::numeric_limits<T>::min();
			T imax = std::numeric_limits<T>::max();
#endif

I know this might not be the most optimal solution, so I thought that creating an issue would be the best thing to do in order to get your feedback and considerations.

Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant