24 inline void erase_all(std::string &
string,
const std::string &search) {
26 for (
size_t pos = 0;;) {
27 pos =
string.find(search,
pos);
28 if (
pos == std::string::npos) {
31 string.erase(
pos, search.length());
38 std::unique_ptr<char, void (*)(void *)>
res{
39 abi::__cxa_demangle(name.c_str(),
nullptr,
nullptr, &status), std::free};
52 std::string
name(typeid_name);
#define PYBIND11_NAMESPACE
PYBIND11_NOINLINE void clean_type_id(std::string &name)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
static std::string type_id()
Return a string representation of a C++ type.
Annotation for function names.
#define PYBIND11_NOINLINE
#define PYBIND11_NAMESPACE_END(name)
#define PYBIND11_NAMESPACE_BEGIN(name)
void erase_all(std::string &string, const std::string &search)
Erase all occurrences of a substring.