C++20 Port #5
| @ -21,6 +21,12 @@ export namespace core { | ||||
| 			this->buffer[max] = max; | ||||
| 		} | ||||
| 
 | ||||
| 		template<usize text_size> constexpr path(char const(&text)[text_size]) { | ||||
| 			static_assert(text_size <= max, "path cannot be longer than maximum length"); | ||||
| 			copy(this->buffer, text.as_bytes()); | ||||
| 			zero(slice{this->buffer}.sliced(text_size, max - text_size)); | ||||
| 		} | ||||
| 
 | ||||
| 		/**
 | ||||
| 		 * Returns the base pointer of the path name. | ||||
| 		 */ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user