Difference between revisions of "Dev:C++11 Migration"

From Synfig Studio :: Documentation
Jump to: navigation, search
m (Useful information about C++11 Migration: fix list)
m (Merged)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
<!-- end Page info -->
 
<!-- end Page info -->
  
Have a look to [https://github.com/d-j-a-y/synfig/tree/djay_fix906_C++11Support C++11Support branch] for progress.
+
Have a look to [https://github.com/d-j-a-y/synfig/tree/djay_fix906_C++11Support C++11Support branch] for progress. C++11 Migration [https://github.com/synfig/synfig/pull/219 merged to master], + other fix.
 +
 
 +
==C++11 compliance or Migration==
 +
* Should keep the possibility to build on C++98.
  
 
==Enable C++ Support==
 
==Enable C++ Support==
 
* DONE : ADD to both {{literal|synfig-core/m4/}} and {{literal|synfig-studio/m4/}} the {{literal|ax_cxx_compile_stdcxx.m4}} {{literal|and ax_cxx_compile_stdcxx_11.m4}} directives from https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
 
* DONE : ADD to both {{literal|synfig-core/m4/}} and {{literal|synfig-studio/m4/}} the {{literal|ax_cxx_compile_stdcxx.m4}} {{literal|and ax_cxx_compile_stdcxx_11.m4}} directives from https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
* DONE : synfig-core and synfig-studio / configure.ac : AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
+
* DONE : synfig-core and synfig-studio / configure.ac : AX_CXX_COMPILE_STDCXX_11([noext],[optional])
  
 
==Fix Code to be compliant==
 
==Fix Code to be compliant==
 
* DONE : replace isnan , isinf by std::isnan , std::isinf
 
* DONE : replace isnan , isinf by std::isnan , std::isinf
 
* replace NULL/0 by nullptr (BOOST MACRO)
 
* replace NULL/0 by nullptr (BOOST MACRO)
* update sigc++
+
* DONE : update sigc++ --> only  #include <sigc++/sigc++.h>
 
* [http://sourceforge.net/p/synfig/mailman/message/34782388/ FIXED] : "lvalue required as unary '&' operand" errors (info [http://eli.thegreenplace.net/2011/12/15/understanding-lvalues-and-rvalues-in-c-and-c/|1] [http://databasefaq.com/index.php/answer/99689/c-class-lvalue-c-error-lvalue-required-as-unary-operand|2] [http://stackoverflow.com/questions/23566857/in-c11-how-can-i-get-a-temporary-lvalue-without-a-name|3] )
 
* [http://sourceforge.net/p/synfig/mailman/message/34782388/ FIXED] : "lvalue required as unary '&' operand" errors (info [http://eli.thegreenplace.net/2011/12/15/understanding-lvalues-and-rvalues-in-c-and-c/|1] [http://databasefaq.com/index.php/answer/99689/c-class-lvalue-c-error-lvalue-required-as-unary-operand|2] [http://stackoverflow.com/questions/23566857/in-c11-how-can-i-get-a-temporary-lvalue-without-a-name|3] )
 +
* DONE : fix warning for preprocessor strings
  
 
==Useful information about C++11 Migration==
 
==Useful information about C++11 Migration==
 
* General information about C++11 : [http://www.stroustrup.com/C++11FAQ.html Stroustrup.b C++11 FAQ]
 
* General information about C++11 : [http://www.stroustrup.com/C++11FAQ.html Stroustrup.b C++11 FAQ]
 
* https://devcentral.f5.com/articles/case-study-linerates-c98-to-c11-migration
 
* https://devcentral.f5.com/articles/case-study-linerates-c98-to-c11-migration

Latest revision as of 21:31, 13 February 2016

Have a look to C++11Support branch for progress. C++11 Migration merged to master, + other fix.

C++11 compliance or Migration

  • Should keep the possibility to build on C++98.

Enable C++ Support

Fix Code to be compliant

  • DONE : replace isnan , isinf by std::isnan , std::isinf
  • replace NULL/0 by nullptr (BOOST MACRO)
  • DONE : update sigc++ --> only #include <sigc++/sigc++.h>
  • FIXED : "lvalue required as unary '&' operand" errors (info [1] [2] [3] )
  • DONE : fix warning for preprocessor strings

Useful information about C++11 Migration