| 12937 | } |
| 12938 | |
| 12939 | TOML_RETURNS_BY_THROWING |
| 12940 | auto finish(const source_position& pos, const source_path_ptr& source_path) const |
| 12941 | { |
| 12942 | *write_pos = '\0'; |
| 12943 | |
| 12944 | #if TOML_EXCEPTIONS |
| 12945 | throw parse_error{ buf, pos, source_path }; |
| 12946 | #else |
| 12947 | return parse_error{ std::string(buf, static_cast<size_t>(write_pos - buf)), pos, source_path }; |
| 12948 | #endif |
| 12949 | } |
| 12950 | |
| 12951 | TOML_DELETE_DEFAULTS(error_builder); |
| 12952 | }; |