added inline to DEFINE_TYPE macro
This commit is contained in:
		
							parent
							
								
									43e07bb92d
								
							
						
					
					
						commit
						0f22ed0b5b
					
				
					 2 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -282,8 +282,8 @@
 | 
			
		|||
@since version 3.9.0
 | 
			
		||||
*/
 | 
			
		||||
#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...)  \
 | 
			
		||||
    void to_json(nlohmann::json& j, const Type& t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
 | 
			
		||||
    void from_json(const nlohmann::json& j, Type& t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
 | 
			
		||||
    inline void to_json(nlohmann::json& j, const Type& t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \
 | 
			
		||||
    inline void from_json(const nlohmann::json& j, Type& t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) }
 | 
			
		||||
 | 
			
		||||
#ifndef JSON_USE_IMPLICIT_CONVERSIONS
 | 
			
		||||
    #define JSON_USE_IMPLICIT_CONVERSIONS 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue