    #include <string>
    #include <iostream>

    void fun (const std::initializer_list<std::string>& strings) {
        for(auto s : strings)
        {
            std::cout << s << " ";
        }
    }

    template<typename ...Args>
    void foo () {
      fun({Args::value...});
    }

    struct A { static std::string value; };
    struct B { static std::string value; };
    struct C { static std::string value; };
    struct D { static std::string value; };

    std::string A::value = "Hello";
    std::string B::value = "World";
    std::string C::value = "of";
    std::string D::value = "Variadic Templates";

    int main()
    {
        foo<A, B, C, D>(); // where A, B, C, D are classes
    }
