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...
"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...