extended variant implementation for C++11