mirror of
				https://github.com/TheLartians/ModernCppStarter.git
				synced 2025-10-31 18:21:35 +01:00 
			
		
		
		
	one more try with dll on windows
cleanup code too
This commit is contained in:
		
							parent
							
								
									d7a5e850a0
								
							
						
					
					
						commit
						f59c0cfbee
					
				
					 4 changed files with 10 additions and 22 deletions
				
			
		|  | @ -7,12 +7,12 @@ | |||
| namespace greeter { | ||||
| 
 | ||||
|   /**  Language codes to be used with the Greeter class */ | ||||
|   enum class GREETER_EXPORT LanguageCode { EN, DE, ES, FR }; | ||||
|   enum class LanguageCode { EN, DE, ES, FR }; | ||||
| 
 | ||||
|   /**
 | ||||
|    * @brief A class for saying hello in multiple languages | ||||
|    */ | ||||
|   class GREETER_EXPORT Greeter { | ||||
|   class Greeter { | ||||
|     std::string name; | ||||
| 
 | ||||
|   public: | ||||
|  | @ -20,14 +20,15 @@ namespace greeter { | |||
|      * @brief Creates a new greeter | ||||
|      * @param name the name to greet | ||||
|      */ | ||||
|     explicit Greeter(std::string _name); | ||||
|     explicit GREETER_EXPORT Greeter(std::string _name); | ||||
| 
 | ||||
|     /**
 | ||||
|      * @brief Creates a localized string containing the greeting | ||||
|      * @param lang the language to greet in | ||||
|      * @return a string containing the greeting | ||||
|      */ | ||||
|     [[nodiscard]] auto greet(LanguageCode lang = LanguageCode::EN) const -> std::string; | ||||
|     [[nodiscard]] auto GREETER_EXPORT greet(LanguageCode lang = LanguageCode::EN) const | ||||
|         -> std::string; | ||||
|   }; | ||||
| 
 | ||||
| }  // namespace greeter
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue