From 1d19ac22cd580fc43825aec3b7c52dc6cc5fc325 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 7 May 2025 07:25:41 +0100 Subject: [PATCH] Added licence text to tuple header Removed redundant include --- include/etl/tuple.h | 57 +++++++++++++++++++++++++++++++++++++++------ test/test_tuple.cpp | 1 - 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/include/etl/tuple.h b/include/etl/tuple.h index 2b15e017..6b4edbdb 100644 --- a/include/etl/tuple.h +++ b/include/etl/tuple.h @@ -1,16 +1,57 @@ -#pragma once +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Documentation: https://www.etlcpp.com/algorithm.html + +Copyright(c) 2024 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +#ifndef ETL_TUPLE_INCLUDED +#define ETL_TUPLE_INCLUDED + +#include "platform.h" + +#if ETL_NOT_USING_CPP11 + #if !defined(ETL_IN_UNIT_TEST) + #error NOT SUPPORTED FOR C++03 OR BELOW + #endif +#else #if ETL_USING_STL #include #endif -#include "etl/nth_type.h" -#include "etl/type_traits.h" -#include "etl/utility.h" -#include "etl/functional.h" +#include "nth_type.h" +#include "type_traits.h" +#include "utility.h" +#include "functional.h" -#include "etl/private/tuple_element.h" -#include "etl/private/tuple_size.h" +#include "private/tuple_element.h" +#include "private/tuple_size.h" namespace etl { @@ -1257,3 +1298,5 @@ namespace std using type = typename etl::nth_type_t; }; } +#endif +#endif diff --git a/test/test_tuple.cpp b/test/test_tuple.cpp index f4af43f3..b79e25dc 100644 --- a/test/test_tuple.cpp +++ b/test/test_tuple.cpp @@ -31,7 +31,6 @@ SOFTWARE. #include "data.h" #include "etl/tuple.h" -#include "etl/private/tuple_size.h" #include #include