I tried to write a pure virtual function in the Base class, and I give it the body next to the definition , as shown in the code below, since I know that I should get a compilation error, but everything worked fine. Is this something new that is related to C ++ 17? (I used visual studio 2017)
class Base { public: virtual void virtual_func() { std::cout << "This a virtual function from BASE" << std::endl; }; virtual void pure_func() = 0 { std::cout << "This a PURE virtual function from BASE" << std::endl; }; };
thanks
source share