Commit fc65ecb9 authored by Matthias Wittgen's avatar Matthias Wittgen
Browse files

add constructor for nullptr_t

parent b39a7094
......@@ -288,7 +288,9 @@ using I64=typename std::conditional<N==64, int64_t, int32_t>::type;
};
variant() : value(nullptr) {}
variant(const std::nullptr_t &other) {
value=other;
}
variant(const variant &other) {
value = other.value;
}
......
......@@ -33,7 +33,7 @@ void run(const char *fn) {
// w.dump();
}
}
......
......@@ -66,5 +66,7 @@ it->dump() ;
std::string &rf=sr;
rf+=" add something";
std::cout << rf <<std::endl;
variant nullp=nullptr;
nullp.dump();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment