File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ set(CMAKE_CXX_STANDARD 20)
3232set (CMAKE_CXX_STANDARD_REQUIRED ON )
3333set (CMAKE_CXX_EXTENSIONS OFF )
3434set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
35+ set (CMAKE_COMPILE_WARNING_AS_ERROR ON )
3536
3637option (ICEBERG_BUILD_STATIC "Build static library" ON )
3738option (ICEBERG_BUILD_SHARED "Build shared library" OFF )
Original file line number Diff line number Diff line change 2626
2727#include " iceberg/iceberg_export.h"
2828#include " iceberg/result.h"
29+ #include " iceberg/util/unreachable.h"
2930
3031namespace iceberg {
3132
@@ -49,6 +50,8 @@ ICEBERG_EXPORT inline std::string_view ToString(FileFormatType format_type) {
4950 case FileFormatType::kPuffin :
5051 return " puffin" ;
5152 }
53+ internal::Unreachable (
54+ std::format (" Invalid file format type: {}" , static_cast <int >(format_type)));
5255}
5356
5457// / \brief Convert a string to a FileFormatType
Original file line number Diff line number Diff line change 3030#include " iceberg/result.h"
3131#include " iceberg/schema_field.h"
3232#include " iceberg/type.h"
33+ #include " iceberg/util/unreachable.h"
3334
3435namespace iceberg {
3536
@@ -221,6 +222,8 @@ ICEBERG_EXPORT constexpr std::string_view ToString(ManifestFile::Content type) n
221222 case ManifestFile::Content::kDeletes :
222223 return " deletes" ;
223224 }
225+ internal::Unreachable (
226+ std::format (" Unknown manifest content type: {}" , static_cast <int >(type)));
224227}
225228
226229// / \brief Get the relative manifest content type from name
Original file line number Diff line number Diff line change 2828#include " iceberg/iceberg_export.h"
2929#include " iceberg/result.h"
3030#include " iceberg/util/timepoint.h"
31+ #include " iceberg/util/unreachable.h"
3132
3233namespace iceberg {
3334
@@ -50,6 +51,8 @@ ICEBERG_EXPORT constexpr std::string_view SnapshotRefTypeToString(
5051 case SnapshotRefType::kTag :
5152 return " tag" ;
5253 }
54+ internal::Unreachable (
55+ std::format (" Invalid snapshot reference type: {}" , static_cast <int >(type)));
5356}
5457// / \brief Get the relative snapshot reference type from name
5558ICEBERG_EXPORT constexpr Result<SnapshotRefType> SnapshotRefTypeFromString (
You can’t perform that action at this time.
0 commit comments