'typeid' versus 'typeof' in C++

后端 未结 6 1347
刺人心
刺人心 2020-11-28 18:08

I am wondering what the difference is between typeid and typeof in C++. Here\'s what I know:

  • typeid is mentioned in t

6条回答
  •  日久生厌
    2020-11-28 18:37

    You can use Boost demangle to accomplish a nice looking name:

    #include 
    

    and something like

    To_main_msg_evt ev("Failed to initialize cards in " + boost::units::detail::demangle(typeid(*_IO_card.get()).name()) + ".\n", true, this);
    

提交回复
热议问题