Http://topic.csdn.net/u/20071020/18/a17e3c83-ae9c-4bf0-b12a-e8b4b6e19721.html
These three questions are the three most difficult and representative questions I encountered when I was looking for a job.
It is good to give a reference to a friend who is looking for a job, learn, or increase confidence.
1.
Can an exception be thrown in the constructor? What about destructor?
Constructor can throw exceptions, but note that resource leakage is prevented when exceptions are thrown.
Do not let exceptions escape the destructor, which may causeProgramStop immediately. Because it may be because of something elseCodeThe exception is caused by calling the class destructor on the stack when the stack is rolled back. If an exception is thrown, The _ terminate () program is called directly to terminate the program.
3.
What is Traits in STL? For example.