Skip to content

Commit

Permalink
Core Concepts (#262)
Browse files Browse the repository at this point in the history
The most general concepts will be located in `mrc/core/concepts`. 

This PR added `core::concepts::not_void` which will be used quite broadly. It's first use will be in `channels::v2` as we never have a channel with a data type of `void`.

Authors:
  - Ryan Olson (https://github.com/ryanolson)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #262
  • Loading branch information
ryanolson authored Jan 13, 2023
1 parent d3d7312 commit 7439865
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cpp/mrc/include/mrc/core/concepts/not_void.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* SPDX-FileCopyrightText: Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*/

#pragma once

#include <concepts>

namespace mrc::core::concepts {

template <typename T>
concept not_void = requires
{
requires not std::same_as<T, void>;
};

} // namespace mrc::core::concepts

0 comments on commit 7439865

Please sign in to comment.