简体   繁体   English

使用C ++作为脚本语言

[英]Using C++ as scripting language

Am wondering if there is any "successful" attempts to create a complete set of templates in C++, so, C++ can be used as a scripting language. 我想知道是否有任何“成功”的尝试在C ++中创建一套完整的模板,因此,C ++可以用作脚本语言。 In other words, get the results at compile time (computation, loop,...) without running the exe. 换句话说,在编译时获取结果(计算,循环,...)而不运行exe。

Think one can calculate recursive items through templates, but having a complete set of functionnality (for, while, and double calculation), I could not find it. 认为可以通过模板计算递归项目,但是有一套完整的功能(for,while和double计算),我找不到它。

"... get the results at compile time (computation, loop,...) without running the exe." “...在编译时获取结果(计算,循环,...)而不运行exe。”

Nope, there's no way. 不,没有办法。

Even if everything is computed at compile time, you'll need to run the executable to retrieve the result. 即使在编译时计算所有内容,您也需要运行可执行文件来检索结果。

Retrieving the result is not available as a compile time feature. 检索结果不可用作编译时功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM