Details

Analiza obravnave napak z razredno predlogo std::expected v jeziku C++
ID Hribernik, Andraž (Author), ID Slivnik, Boštjan (Mentor) More about this mentor... This link opens in a new window, ID Čibej, Uroš (Comentor)

.pdfPDF - Presentation file, Download (617,14 KB)
MD5: 2E61B6AB51F512CBCCFA425F1EBF5F65

Abstract
Obstoječi mehanizmi za obravnavo napak v jeziku C++, kot so statusne kode in izjeme, trpijo za pomanjkljivostmi v varnosti, predvidljivosti ali informativnosti. To diplomsko delo sistematično analizira te pristope in kot rešitev predstavi predlogo razreda std::expected iz standarda C++23. Z metodo refaktorizacije praktičnega primera je prikazano, kako std::expected z eksplicitno in tipsko varno obravnavo napak presega omejitve preteklih rešitev. Ključni prispevek naloge je demonstracija, da std::expected ponuja uravnoteženo združitev zmogljivosti, varnosti in berljivosti kode, s čimer predstavlja robusten temelj za pisanje zanesljive programske opreme v sodobnem jeziku C++.

Language:Slovenian
Keywords:računalništvo, C++, obravnava napak, std::expected
Work type:Bachelor thesis/paper
Typology:2.11 - Undergraduate Thesis
Organization:FRI - Faculty of Computer and Information Science
Year:2025
PID:20.500.12556/RUL-173251 This link opens in a new window
COBISS.SI-ID:250579971 This link opens in a new window
Publication date in RUL:15.09.2025
Views:314
Downloads:73
Metadata:XML DC-XML DC-RDF
:
Copy citation
Share:Bookmark and Share

Secondary language

Language:English
Title:An Analysis of Error Handling with the std::expected Template Class in C++
Abstract:
Existing error handling mechanisms in the C++ language, such as status codes and exceptions, suffer from shortcomings in safety, predictability, or informativeness. This thesis systematically analyzes these approaches and introduces the std::expected template class from the C++23 standard as a solution. Using a practical refactoring case study, we demonstrate how std::expected overcomes the limitations of previous solutions through explicit and type-safe error handling. The key contribution is demonstrating that std::expected offers a balanced combination of performance, safety, and code readability, thereby representing a robust foundation for writing reliable software in the modern C++ language.

Keywords:computer science, C++, error handling, std::expected

Similar documents

Similar works from RUL:
Similar works from other Slovenian collections:

Back