boost::mpl::for_each without instantiating

后端 未结 2 1761
一向
一向 2020-12-29 13:03

Taking the following example, I wonder whether there is an alternative to boost::mpl::for_each, which does call a Functor without any arguments.



        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-29 13:40

    You should use the three parameter for_each:

    mpl::for_each(Registrator())
    

    Then the instances you get will be of single_view.

提交回复
热议问题