mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 02:01:33 +01:00 
			
		
		
		
	do not use NOLINT comments
add a note about missing execptin handling in main
This commit is contained in:
		
							parent
							
								
									d9210698c9
								
							
						
					
					
						commit
						268a860b8f
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -6,8 +6,7 @@ | ||||||
| #include <string> | #include <string> | ||||||
| #include <unordered_map> | #include <unordered_map> | ||||||
| 
 | 
 | ||||||
| // NOLINTNEXTLINE(modernize-use-trailing-return-type)
 | auto main(int argc, char** argv) -> int { | ||||||
| int main(int argc, char** argv) { |  | ||||||
|   const std::unordered_map<std::string, greeter::LanguageCode> languages{ |   const std::unordered_map<std::string, greeter::LanguageCode> languages{ | ||||||
|       {"en", greeter::LanguageCode::EN}, |       {"en", greeter::LanguageCode::EN}, | ||||||
|       {"de", greeter::LanguageCode::DE}, |       {"de", greeter::LanguageCode::DE}, | ||||||
|  | @ -29,7 +28,7 @@ int main(int argc, char** argv) { | ||||||
|   ; |   ; | ||||||
|   // clang-format on
 |   // clang-format on
 | ||||||
| 
 | 
 | ||||||
|   auto result = options.parse(argc, argv); |   auto result = options.parse(argc, argv); // TODO: may throw! CK
 | ||||||
| 
 | 
 | ||||||
|   if (result["help"].as<bool>()) { |   if (result["help"].as<bool>()) { | ||||||
|     std::cout << options.help() << std::endl; |     std::cout << options.help() << std::endl; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue