其他分享
首页 > 其他分享> > c – enable_if和转换运算符?

c – enable_if和转换运算符?

作者:互联网

有没有机会将enable_if与类型转换运算符一起使用?看起来很棘手,因为返回类型和参数列表都是隐式的.

解决方法:

dixit documentation
似乎没有办法为转换运算符指定启用码.但是,转换构造函数可以将启用程序作为额外的默认参数.

标签:c,operator-overloading,casting,boost,enable-if
来源: https://codeday.me/bug/20191004/1854132.html