diff --git a/include/sparrow/data_type.hpp b/include/sparrow/data_type.hpp index b1676cf3..01da569f 100644 --- a/include/sparrow/data_type.hpp +++ b/include/sparrow/data_type.hpp @@ -49,6 +49,7 @@ namespace sparrow static_assert(std::is_floating_point_v); static_assert(std::is_floating_point_v); static_assert(std::is_floating_point_v); + static_assert(CHAR_BIT == 8); /// Runtime identifier of arrow data types, usually associated with raw bytes with the associated value. diff --git a/test/test_mpl.cpp b/test/test_mpl.cpp index e249f7c3..de470938 100644 --- a/test/test_mpl.cpp +++ b/test/test_mpl.cpp @@ -45,6 +45,11 @@ namespace sparrow static_assert(mpl::all_of(test_list{})); static_assert(not mpl::all_of(test_list{})); + static constexpr auto some_types = mpl::typelist{}; + static constexpr auto same_as_int = mpl::predicate::same_as{}; + static_assert( mpl::any_of(some_types, same_as_int) == true); + static_assert(mpl::all_of(some_types, same_as_int) == false); + static_assert(mpl::find_if(test_list{}, mpl::predicate::same_as{}) == 0); static_assert(mpl::find_if(test_list{}, mpl::predicate::same_as{}) == 1); diff --git a/test/test_traits.cpp b/test/test_traits.cpp index 08b3ec06..84110cf5 100644 --- a/test/test_traits.cpp +++ b/test/test_traits.cpp @@ -1,3 +1,16 @@ +// Copyright 2024 Man Group Operations Limited +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include