From 8ec22b7d5cdd340811094d1db5af899023ef8192 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 17 Nov 2024 21:31:25 -0800 Subject: [PATCH] [wpiutil] Remove unfinished ct_map class (#7406) --- wpiutil/src/main/native/include/wpi/ct_map.h | 35 -------------------- 1 file changed, 35 deletions(-) delete mode 100644 wpiutil/src/main/native/include/wpi/ct_map.h diff --git a/wpiutil/src/main/native/include/wpi/ct_map.h b/wpiutil/src/main/native/include/wpi/ct_map.h deleted file mode 100644 index 8456f46bb5..0000000000 --- a/wpiutil/src/main/native/include/wpi/ct_map.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - -#pragma once - -#include -#include -#include -#include -#include - -namespace wpi { - -template -class ct_map { - constexpr ct_map(); - - [[nodiscard]] - constexpr const Value& operator[](const Key& key) const { - if (const auto it = - std::find_if(data.begin(), data.end(), - [&key](const auto& v) { return v.first == key; }); - it != data.end()) { - return it->second; - } else { - throw std::range_error("Not found"); - } - } - - private: - std::array, Size> data; -}; - -} // namespace wpi