mardi 28 avril 2015

How can I explicitly view the results of type inference by auto?

I am newly studying auto feature of C++11/14.

For educational purpose, I would like to explicitly display the result of type inference of my code. I tried typeid().name(), but I found two problems with this approach.

  1. Output is sometimes difficult to understand. (For example, "NSt3__16vectorIiNS_9allocatorIiEEEE")
  2. const/volatile modifiers do not seem to be displayed.

I am using clang 6.1.0.

Aucun commentaire:

Enregistrer un commentaire