The Montana C++ programming environment provides an API interface to the compiler, which allows the comilation process to be extended through programmer-supplied tools. This paper investigates the feasibility of that interface, usign smart pointers as an example. Smart pointers are a powerful feature of the C++ language that enable a variety of applications, such as garbage collection, persistence, and distributed objects. However, while smart pointers can be used in much the same way as built-in pointers, they are not interchangeable. Using the Montana API, smart pointer functionality can be introduced for built-in pointers, thus enabling built-in pointers that act like smart pointers. We provide an overview of the Montana programming environment and describes how smart pointers can be implemented using the Montana API.
展开▼
机译:Montana C ++编程环境为编译器提供了API接口,该接口允许通过程序员提供的工具扩展编译过程。本文以实用的智能指针为例,研究了该接口的可行性。智能指针是C ++语言的强大功能,可启用各种应用程序,例如垃圾收集,持久性和分布式对象。但是,尽管可以使用与内置指针几乎相同的方式使用智能指针,但是它们不可互换。使用Montana API,可以为内置指针引入智能指针功能,从而启用充当智能指针的内置指针。我们概述了Montana编程环境,并描述了如何使用Montana API实现智能指针。
展开▼