-
Notifications
You must be signed in to change notification settings - Fork 98
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
Silence warning in Visual Studio 2010 when using zdouble #10
Comments
I now have visual studio 2013 up and running without without warnings, expect for the fact that asctime and gmtime are not thread safe (which I have decided to leave for the time being). Would you please provide a simple example that results in the warnings you intend to fix here and (so I can add it to the CppAD tests to make sure that the fix works). |
The warning appear at every call to ‘Forward(0, x)’; Example:
If I add this template constructor template And remove the double constructor
Then the warnings are silenced. Kind regards Loutjie From: Brad Bell [mailto:notifications@github.com] I now have visual studio 2013 up and running without without warnings, expect for the fact that asctime and gmtime are not thread safe (which I have decided to leave for the time being). Would you please provide a simple example that results in the warnings you intend to fix here and (so I can add it to the CppAD tests to make sure that the fix works). — |
We compile at Warning Level 4. From: Brad Bell [mailto:notifications@github.com] I now have visual studio 2013 up and running without without warnings, expect for the fact that asctime and gmtime are not thread safe (which I have decided to leave for the time being). Would you please provide a simple example that results in the warnings you intend to fix here and (so I can add it to the CppAD tests to make sure that the fix works). — |
Warning level 4 Brad. On 9/22/2015 10:15 PM, Loutjie wrote:
|
On 9/22/2015 10:14 PM, Loutjie wrote:
I have made some recent changes and now get no warning (with Visual Note that this includes no warnings when compiling the file In addition, I have tried replacing zdouble.cpp by the following (at include <cppad/cppad.hpp>bool zdouble(void) |
If one uses the Visual Studio 2013 and the windows download, extraction, and testing instructions on
Note that the CppAD source code now suppresses the warnings
|
Visual Studio 2010 generates warning when using zdouble in place of double. To silence then, the following constructors are added:
/// Constructor from size_t
zdouble(const size_t& ulong)
: dbl_((double)ulong)
{ }
/// Constructor from int
zdouble(const int& signint)
: dbl_((double)signint)
{ }
The text was updated successfully, but these errors were encountered: