Skip to content
Artem Pavlenko edited this page Jun 11, 2014 · 1 revision

Variant implementation using variadic templates c++11

#include <iostream>
#include <string>
#include <mapbox/util/variant.hpp>

int main()
{
    using namespace mapbox;
    util::variant<int,double,std::string> var;
    var = 123;
    std::cerr << var << std::endl;
    return 0;
}

Clone this wiki locally