Subscribe to this list via RSS Blog posts tagged in C++1z

Posted by on in Programming
About "any type" in C++11[JAPAN] About "any type" in C++11[JAPAN] C++1z(C++17) expects "std::any" to be prepared. C++Builder(C++11) can use boost. Its version is 1_55. //// #define BOOST_VERSION 105500 #define BOOST_LIB_VERSION "1_55" "boost::any" can be used.  //// #include <boost/any.hpp>; //// void __fastcall TForm1::Button1Click(TObject *Sender) { //value of the float boost::any button_and_float = BOOST_VERSION + 0.0001; //Place TButton in the same variable. //But, it does not go out err...

Posted by on in Programming
C++Builder About noexcept & throw[JAPAN] "noexcept" has been added since C++11. The "throw" attached to the method from C++1z(17) may be an error. //// void func() throw() {} //C++17 Error void func() {} //C++17 OK It is possible to add "noexcept" to a method from C++11. //// void func() noexcept(false) { throw std::runtime_error("error"); } //Exception handling is ignored if it is below. void func() noexcept //noexcept(true) { throw std::runtime_error("error"); }   The following is how to use in...
  • Page :
  • 1

Check out more tips and tricks in this development video: