i meet compile error when use std in r19, the specific error prompts and simple test codes are as follows
Error C2784 'const _Ty &std::_Max_value(const _Ty &,const _Ty &) noexcept': could not deduce template argument for 'const
_Ty &' from 'unsigned __int64'
Error C2782 'const _Ty &std::_Max_value(const _Ty &,const _Ty &) noexcept': template parameter '_Ty' is ambiguous
Error C2672 '_Max_value': no matching overloaded function found
it no errors in r20, and if any additional considerations in r19 when use std?
hope your help!
Ok, could reproduce it.
That's because of the platform toolset. (using a different Visual Studio)
In your project properties, Configuration Properties -> General -> Platform Toolset you should have Visual Studio 2015 (v140).
If you don't have it, you have to install it.
I've marked your thread as a question, feel free to mark it as solved when you think it is, see this thread for information : Q&A New Functionality.
Regarding your issue, i couldn't reproduce it using both visual studio 2015 and 2017.
You should probably stick to this recommendation regarding the visual studio to use :
About string you should use our builtin String class. We have a manual with lot of information
Are you trying this with the Cinema4D SDK example or your own project ?
Does this project is coming from r19 or an older version ?
@m_magalhaes use r19 sdk , not change any thing, just add two line in main.cpp:
...//other head file
VERSIONTYPE versionType = GeGetVersionType();
it will case same error. not only std::string, other like std::vector, std::set also fail. looks like something conflict with std in r19.
@m_magalhaes thank you! switch to 2015(v140) is all right : )
I know this is quite an old topic, @m_magalhaes @Jmelon it would compile if you put c4d.h at the end of all other STL includes