check no call function

This commit is contained in:
Neargye 2018-04-30 01:37:25 +05:00
parent ebc3c197ef
commit 6211191084

View file

@ -28,23 +28,23 @@
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <iostream> #include <stdexcept>
struct SomeStruct { struct SomeStruct {
int somefield; int somefield;
void SomeMethod1(const int i) { void SomeMethod1(const int i) {
somefield = i; somefield = i;
std::cout << "No called!" << std::endl; throw std::exception{};
} }
int SomeMethod2() const { int SomeMethod2() const {
std::cout << "No called!" << std::endl; throw std::exception{};
return somefield; return somefield;
} }
}; };
void SomeMethod3() { std::cout << "No called!" << std::endl; } void SomeMethod3() { throw std::exception{}; }
struct Long { struct Long {
struct LL { struct LL {