Skip to content

Commit

Permalink
Applied review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaim committed Apr 5, 2024
1 parent 67b4769 commit f98b986
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sparrow/data_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace sparrow
static_assert(std::is_floating_point_v<float16_t>);
static_assert(std::is_floating_point_v<float32_t>);
static_assert(std::is_floating_point_v<float64_t>);
static_assert(CHAR_BIT == 8);


/// Runtime identifier of arrow data types, usually associated with raw bytes with the associated value.
Expand Down
5 changes: 5 additions & 0 deletions test/test_mpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ namespace sparrow
static_assert(mpl::all_of<std::is_integral>(test_list{}));
static_assert(not mpl::all_of<std::is_floating_point>(test_list{}));

static constexpr auto some_types = mpl::typelist<int, float>{};
static constexpr auto same_as_int = mpl::predicate::same_as<int>{};
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<int>{}) == 0);
static_assert(mpl::find_if(test_list{}, mpl::predicate::same_as<char>{}) == 1);
Expand Down
13 changes: 13 additions & 0 deletions test/test_traits.cpp
Original file line number Diff line number Diff line change
@@ -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 <sparrow/data_traits.hpp>

Expand Down

0 comments on commit f98b986

Please sign in to comment.