This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void node_param_value(std::shared_ptr<tag_node> &node, const std::string &value) | |
{ | |
auto string = std::make_shared<xmlrpc::tag_node>("string"); | |
string->append_child(std::make_shared<xmlrpc::text_node>(value)); | |
node->append_child(string); | |
} | |
void node_param_value(std::shared_ptr<tag_node> &node, int value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class T, class R, class... As> | |
constexpr unsigned long memfn_cast(R(T::*mfnp)(As...)) | |
{ | |
union { | |
unsigned long u_ul; | |
R(T::*u_mfnp)(As...); | |
} addr; | |
addr.u_mfnp = mfnp; | |
return addr.u_ul; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class my_class | |
{ | |
public: | |
void test() | |
{ | |
std::cout << "Hello C++" << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class replacement | |
{ | |
public: | |
void setter(int a) | |
{ | |
_setter(this, a); | |
} | |
int getter() const | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class replacement | |
{ | |
public: | |
void **vmt; | |
void setter(int a) | |
{ | |
_setter(this, a); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class replacement | |
{ | |
public: | |
struct vmt_t | |
{ | |
void (*dtor)(void* _this); | |
getter_fn_t *virtual_getter; | |
} *vmt; | |
void setter(int a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class my_class | |
{ | |
public: | |
virtual ~my_class() | |
{ | |
std::cout << __PRETTY_FUNCTION__ << "() called" << std::endl; | |
} | |
void setter(int a) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class my_class | |
{ | |
public: | |
void setter(int a) | |
{ | |
_some_member = a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class my_class | |
{ | |
public: | |
void setter(int a) | |
{ | |
_some_member = a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class my_nullptr_t | |
{ | |
public: | |
template<class T> | |
operator T*() const noexcept | |
{ | |
return reinterpret_cast<T*>(0); | |
} | |
} my_nullptr; |