/** * @file config.hpp * @brief Application configuration using modern C++23 features. */ #pragma once #include #include #include #include namespace app::core { /** * @brief Runtime configuration loaded from environment or defaults. */ struct Config { std::string app_name{"MyApp"}; std::string database_url{"sqlite:///app.db"}; std::string secret_key{"change-me"}; int port{8080}; bool debug{false}; /** * @brief Load configuration from environment variables. * @return Config object or error string. */ static std::expected from_env(); }; } // namespace app::core