Summary

In this chapter, we have examined several different, independent compile-time features. You've learned how to use the pragma statement to print compile-time messages and link with libraries in code. You've taken a look at how to implement conditional compilation with version, debug, and static if. You've gone through the basic usage of the import expression and string mixins, and learned how to force functions to be evaluated at compile time. Finally, we've examined static assert, the is expression, data alignment, compile-time reflection, and user-defined attributes.

The purpose of this chapter is to set the stage for the next chapter, which introduces templates. Using templates with the compile-time features covered here opens the door to a whole new world.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.34.25