Vec

  • Type
  • April 17, 2026
Table of Contents

Vec

Description

Vector type for directory contents.

Usage example (Cross-references)

    #define FUZZ_VEC_CHAR_PTR_H
    
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Types.h>
    
    // Vec(char*) typedef
    typedef Vec(char *) CharPtrVec;
    
    // Vec(char*) function enumeration
    #define FUZZ_VEC_STR_H
    
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Container/Str.h>
    #include <Misra/Types.h>
    
    // Vec(Str) typedef
    typedef Vec(Str) StrVec;
    
    // Vec(Str) function enumeration
    #define FUZZ_VEC_INT_H
    
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Types.h>
    
    // Vec(i32) typedef
    typedef Vec(i32) IntVec;
    
    // Vec(i32) function enumeration
    #include "../Harness.h"
    #include "VecCharPtr.h"
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Memory.h>
    #include <Misra/Std/Log.h>
    #include "../Harness.h"
    #include "VecStr.h"
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Container/Str.h>
    #include <Misra/Std/Log.h>
    #include "../Harness.h"
    #include "VecInt.h"
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    // ct
    #include <Misra/Std/Container/Str.h>
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <Misra/Sys.h>
    "date: 2025-05-12T05:00:00Z\n"
    "# image: \"/images/image-placeholder.png\"\n"
    "categories: [\"Vec\", \"Macro\", \"Generic\"]\n"
    "author: \"Siddharth Mishra\"\n"
    "tags: [\"vec\", \"macro\", \"generic\"]\n"
    } EnumEntry;
    
    typedef Vec(EnumEntry) EnumEntries;
    
    int main(int argc, char **argv) {
    );
    
    Vec(int) vi = VecInit();
    VecForeachIdx(&vi, val, i) {
    WriteFmtLn("{}", val);
    } AnnSymbol;
    
    typedef Vec(AnnSymbol) AnnSymbols;
    
    typedef struct ApiResponse {
    u64 analysis_id;
    Str sha256;
    Vec(Str) tags;
    Str created_at;
    u64 model_id;
    Str  json    = StrInit();
    
    Vec(FunctionInfo) functions = VecInitWithDeepCopy(NULL, FunctionInfoDeinit);
    
    FunctionInfo func1 = {12345, StrInitFromZstr("test_func"), 1024, 4096};
    Str  json    = StrInit();
    
    Vec(AnnSymbol) symbols = VecInitWithDeepCopy(NULL, AnnSymbolDeinit);
    
    AnnSymbol sym1             = {0};
    Str  json    = StrInit();
    
    Vec(u32) numbers = VecInit();
    u32 num1 = 1, num2 = 2, num3 = 3;
    VecPushBack(&numbers, num1);
    VecPushBack(&numbers, num3);
    
    Vec(Str) strings = VecInitWithDeepCopy(NULL, StrDeinit);
    
    // Create strings and push them properly
    VecPushBack(&strings, str3);
    
    Vec(bool) booleans = VecInit();
    bool bool1 = true, bool2 = false, bool3 = true;
    VecPushBack(&booleans, bool1);
    Str name;
    f64 price;
    Vec(Str) tags;
    } SimpleProduct;
    StrIter si      = StrIterFromStr(json);
    
    Vec(Str) languages = VecInitWithDeepCopy(NULL, StrDeinit);
    
    JR_OBJ(si, {
    } AnnSymbol;
    
    typedef Vec(AnnSymbol) AnnSymbols;
    
    typedef struct ApiResponse {
    } FunctionInfo;
    
    typedef Vec(FunctionInfo) FunctionInfos;
    
    typedef struct ModelInfo {
    } ModelInfo;
    
    typedef Vec(ModelInfo) ModelInfos;
    
    typedef struct SearchResult {
    u64 analysis_id;
    Str sha256;
    Vec(Str) tags;
    Str created_at;
    u64 model_id;
    } SearchResult;
    
    typedef Vec(SearchResult) SearchResults;
    
    void FunctionInfoDeinit(FunctionInfo *info) {
    StrIter si = StrIterFromStr(json);
    
    typedef Vec(AnnSymbol) Symbols;
    Symbols symbols = VecInitWithDeepCopy(NULL, AnnSymbolDeinit);
    Str  json    = StrInit();
    
    Vec(i32) empty_numbers = VecInit();
    Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    
    Vec(i32) empty_numbers = VecInit();
    Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    
    JW_OBJ(json, {
    Str  json    = StrInit();
    
    Vec(i32) empty_list = VecInit();
    
    JW_OBJ(json, {
    Str  json    = StrInit();
    
    Vec(i32) empty_arr  = VecInit();
    Vec(i32) filled_arr = VecInit();
    i32 val1 = 1, val2 = 2;
    
    Vec(i32) empty_arr  = VecInit();
    Vec(i32) filled_arr = VecInit();
    i32 val1 = 1, val2 = 2;
    VecPushBack(&filled_arr, val1);
    Str name;
    f64 price;
    Vec(Str) tags;
    } SimpleProduct;
    Str  json    = StrInit();
    
    Vec(Str) languages = VecInitWithDeepCopy(NULL, StrDeinit);
    
    // Create strings and push them properly
    u32  timeout;
    Str  log_level;
    Vec(Str) features;
    } TestConfig;
    TestPerson user;
    TestConfig config;
    Vec(i32) numbers;
    Vec(bool) flags;
    } ComplexData;
    TestConfig config;
    Vec(i32) numbers;
    Vec(bool) flags;
    } ComplexData;
    
    // Original data
    Vec(i32) original_numbers = VecInit();
    Vec(Str) original_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    // Original data
    Vec(i32) original_numbers = VecInit();
    Vec(Str) original_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    
    // Populate arrays
    
    // Read back from JSON
    Vec(i32) parsed_numbers = VecInit();
    Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    // Read back from JSON
    Vec(i32) parsed_numbers = VecInit();
    Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    
    StrIter si = StrIterFromStr(json);
    
    // Original empty data
    Vec(i32) empty_numbers = VecInit();
    Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    Str empty_str          = StrInit();
    // Original empty data
    Vec(i32) empty_numbers = VecInit();
    Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    Str empty_str          = StrInit();
    
    // Read back from JSON
    Vec(i32) parsed_numbers = VecInit();
    Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    Str  parsed_str         = StrInit();
    // Read back from JSON
    Vec(i32) parsed_numbers = VecInit();
    Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
    Str  parsed_str         = StrInit();
    bool found_empty_object = false;
    f64  small_float;
    bool is_valid;
    Vec(Str) empty_array;
    Vec(i64) numbers;
    } EdgeCaseData;
    bool is_valid;
    Vec(Str) empty_array;
    Vec(i64) numbers;
    } EdgeCaseData;
    StrIter si1   = StrIterFromStr(json1);
    
    Vec(i32) items = VecInit();
    
    JR_OBJ(si1, {
    StrIter si2   = StrIterFromStr(json2);
    
    Vec(Str) data = VecInitWithDeepCopy(NULL, StrDeinit);
    
    JR_OBJ(si2, {
    struct {
    i32 x_value;
    Vec(i32) filled_items;
    } obj = {0, VecInit()};
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <stdio.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Ops tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Ops");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <stdio.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Test with a vector with alignment > 1
    typedef Vec(int) AlignedIntVec;
    AlignedIntVec aligned_vec = VecInitAligned(8);
    
    // Create a vector of integers with default alignment (1)
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector with 8-byte alignment
    typedef Vec(int) AlignedIntVec;
    AlignedIntVec aligned_vec = VecInitAligned(8);
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Access tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Access");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Use centralized test driver (no more argc/argv needed)
    return run_test_suite(normal_tests, normal_count, NULL, 0, "Vec.Remove");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <stdio.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Memory tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Memory");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    
    // Test with int type
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Test with struct type
    typedef Vec(TestItem) TestVec;
    TestVec test_vec = VecInit();
    
    // Test with int type and 4-byte alignment
    typedef Vec(int) IntVec;
    IntVec vec = VecInitAligned(4);
    
    // Test with struct type and 16-byte alignment
    typedef Vec(TestItem) TestVec;
    TestVec test_vec = VecInitAligned(16);
    
    // Test with struct type and custom copy/deinit functions
    typedef Vec(TestItem) TestVec;
    TestVec vec = VecInitWithDeepCopy(TestItemCopyInit, TestItemDeinit);
    
    // Test with struct type, custom copy/deinit functions, and 8-byte alignment
    typedef Vec(TestItem) TestVec;
    TestVec vec = VecInitAlignedWithDeepCopy(TestItemCopyInit, TestItemDeinit, 8);
    
    // Test with basic int type
    typedef Vec(int) IntVec;
    IntVec vec;
    
    // Test with struct type
    typedef Vec(TestItem) TestVec;
    TestVec test_vec;
    
    // Create a source vector
    typedef Vec(int) IntVec;
    IntVec src = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Init tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Init");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <stdio.h>
    // Test basic Vec type functionality
    bool test_vec_type_basic(void) {
    WriteFmt("Testing basic Vec type functionality\n");
    
    // Define a vector of integers
    
    // Define a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Test with a struct type
    typedef Vec(TestItem) TestVec;
    TestVec test_vec = VecInit();
    
    // Create a valid vector
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Type tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Type");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeach where modification causes out of bounds access (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeachIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeachReverseIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeachPtrIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeachPtrReverseIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing VecForeachPtrInRangeIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    WriteFmt("Testing basic VecForeachIdx where idx goes out of bounds (should crash)\n");
    
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Foreach.Simple tests\n\n");
    
    // Array of normal test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Foreach.Simple");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Memory.h>
    #include <Misra/Std/Log.h>
    
    // Create a vector of ComplexItem with deep copy functions
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(ComplexItemCopyInit, ComplexItemDeinit);
    
    // Create a vector of ComplexItem with deep copy functions
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(ComplexItemCopyInit, ComplexItemDeinit);
    
    // Create a vector of ComplexItem with deep copy functions
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(ComplexItemCopyInit, ComplexItemDeinit);
    
    // Create two vectors of ComplexItem with deep copy functions
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec1 = VecInitWithDeepCopy(ComplexItemCopyInit, ComplexItemDeinit);
    ComplexVec vec2 = VecInitWithDeepCopy(ComplexItemCopyInit, ComplexItemDeinit);
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a temporary vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec temp_vec = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    
    // Create a vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    
    // Create a vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    
    // Create a vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    
    // Create a vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec1 = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    ComplexVec vec2 = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    
    // Create a vector with no copy_init but with copy_deinit for proper cleanup
    typedef Vec(ComplexItem) ComplexVec;
    ComplexVec vec = VecInitWithDeepCopy(NULL, ComplexItemDeinit);
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Complex tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Complex");
    }
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Log.h>
    #include <stdio.h>
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec1 = VecInit();
    
    // Create a vector of integers
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    
    // Create a vector of integers without copy_init
    typedef Vec(int) IntVec;
    IntVec vec = VecInit();
    // Main function that runs all tests
    int main(void) {
    WriteFmt("[INFO] Starting Vec.Insert tests\n\n");
    
    // Array of test functions
    
    // Run all tests using the centralized test driver
    return run_test_suite(tests, total_tests, NULL, 0, "Vec.Insert");
    }
    
    #include <Misra/Std/Container/Str.h>
    #include <Misra/Std/Container/Vec.h>
    #include <Misra/Std/Container/List.h>
    #include <Misra/Std/Container/BitVec.h>
    
    #include <Misra/Types.h>
    #include <Misra/Std/Container/Vec/Type.h>
    
    typedef Vec(const char *) Zstrs;
    #include <Misra/Std/Container/Vec/Type.h>
    
    typedef Vec(const char *) Zstrs;
    
    ///
    
    // clang-format off
    #include "Vec/Type.h"
    #include "Vec/Init.h"
    #include "Vec/Insert.h"
    // clang-format off
    #include "Vec/Type.h"
    #include "Vec/Init.h"
    #include "Vec/Insert.h"
    #include "Vec/Remove.h"
    #include "Vec/Type.h"
    #include "Vec/Init.h"
    #include "Vec/Insert.h"
    #include "Vec/Remove.h"
    #include "Vec/Access.h"
    #include "Vec/Init.h"
    #include "Vec/Insert.h"
    #include "Vec/Remove.h"
    #include "Vec/Access.h"
    #include "Vec/Memory.h"
    #include "Vec/Insert.h"
    #include "Vec/Remove.h"
    #include "Vec/Access.h"
    #include "Vec/Memory.h"
    #include "Vec/Foreach.h"
    #include "Vec/Remove.h"
    #include "Vec/Access.h"
    #include "Vec/Memory.h"
    #include "Vec/Foreach.h"
    #include "Vec/Ops.h"
    #include "Vec/Access.h"
    #include "Vec/Memory.h"
    #include "Vec/Foreach.h"
    #include "Vec/Ops.h"
    #include "Vec/Private.h"
    #include "Vec/Memory.h"
    #include "Vec/Foreach.h"
    #include "Vec/Ops.h"
    #include "Vec/Private.h"
    // clang-format on
    #include "Vec/Foreach.h"
    #include "Vec/Ops.h"
    #include "Vec/Private.h"
    // clang-format on
    /// TAGS: Vec, Generic, Length, Size, Aligned, Pointer
    ///
    #define Vec(T)                                                                                                         \
    struct {                                                                                                           \
    u64               length;                                                                                      \
    #define MISRA_STD_CONTAINER_STR_INIT_H
    
    #include "Misra/Std/Container/Vec/Type.h"
    #include "Type.h"
    #include <Misra/Std/Memory.h>
    
    #include <string.h>
    #include <Misra/Std/Container/Vec/Type.h>
    #include <Misra/Std/Utility/Iter/Type.h>
    #include <Misra/Types.h>
    /// The Str type is a specialization of Vec for characters
    ///
    typedef Vec(char) Str;
    
    ///
    /// Vector of strings
    ///
    typedef Vec(Str) Strs;
    
    ///
    #include <Misra/Std/Container/Common.h>
    #include <Misra/Types.h>
    #include <Misra/Std/Container/Vec.h>
    
    ///
    } BitVec;
    
    typedef Vec(BitVec) BitVecs;
    
    #define MISRA_BITVEC_MAGIC MISRA_MAKE_NEW_MAGIC_VALUE("bitvectr")
    #define MISRA_STD_UTILITY_STR_ITER_H
    
    #include <Misra/Std/Container/Vec/Type.h>
    #include <Misra/Std/Utility/Iter.h>
    #include <Misra/Types.h>
    
    typedef Iter(char) StrIter;
    typedef Vec(StrIter) StrIters;
    
    ///

Share :

Related Posts

SysAbort

SysAbort Description Custom abort function that can be redirected for testing purposes. By default, this calls the standard abort() function. If a callback is set via SysSetAbortCallback, it calls the callback instead.

Read More

LogDeinit

LogDeinit Description Shut down logging subsystem and release resources

Read More

LogWrite

LogWrite Description Core log message generation function

Read More