std :: log2()是扩展程序还是C ++标准? [英] Is std::log2() an extension or C++ standard?

查看:294
本文介绍了std :: log2()是扩展程序还是C ++标准?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gcc(4.8.1)和clang(3.4)编译使用std::log2(x)的C ++程序.该标准符合要求吗?

gcc (4.8.1) and clang (3.4) compile my C++ program which uses std::log2(x). Is this standard compliant?

推荐答案

自C ++ 11起,它现在包含在<cmath>标头中.

It is now included in <cmath> header since C++11.

您可以在此处找到更多信息: std :: log2

You can find more information here: std::log2

这篇关于std :: log2()是扩展程序还是C ++标准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆