#includeIn this example, we have declared an unordered_set object called set1. We have checked whether the set is empty using the set1.empty() function. As the set is empty, the value returned by the function is true and the message "The set is empty." is displayed. We have then added an element to the set using the insert() function, and checked again whether the set is empty or not. As the set now has an element, the value returned by the function is false and the message "The set is not empty." is displayed. Package library: Standard Template Library (STL)#include int main() { std::unordered_set set1; if(set1.empty()) { std::cout << "The set is empty.\n"; } else { std::cout << "The set is not empty.\n"; } set1.insert(1); if(set1.empty()) { std::cout << "The set is empty.\n"; } else { std::cout << "The set is not empty.\n"; } return 0; }