Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SavedLiteral
Note: This documentation is automatically generated.
When storing a reference to a literal, it is important not to forget when
reading it back to take its representative. Otherwise, we might introduce
literal that have already been removed, which will break invariants in a
bunch of places.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["The `SavedLiteral` class in C++ manages references to literals, ensuring consistency. Key actions include storing a literal's reference and retrieving its representative when reading it back. The documentation highlights the critical need to retrieve the representative, otherwise introducing removed literals can break invariants. The class provides methods: `Get` to retrieve the representative, and `SavedLiteral` constructors, one default and one that takes an integer `ref` argument.\n"],null,[]]