diff options
Diffstat (limited to 'libtransport/includes/hicn/transport/utils')
-rw-r--r-- | libtransport/includes/hicn/transport/utils/CMakeLists.txt | 1 | ||||
-rw-r--r-- | libtransport/includes/hicn/transport/utils/move_wrapper.h | 39 |
2 files changed, 0 insertions, 40 deletions
diff --git a/libtransport/includes/hicn/transport/utils/CMakeLists.txt b/libtransport/includes/hicn/transport/utils/CMakeLists.txt index bbd149e09..1dba94451 100644 --- a/libtransport/includes/hicn/transport/utils/CMakeLists.txt +++ b/libtransport/includes/hicn/transport/utils/CMakeLists.txt @@ -32,7 +32,6 @@ list(APPEND HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/string_utils.h ${CMAKE_CURRENT_SOURCE_DIR}/file.h ${CMAKE_CURRENT_SOURCE_DIR}/shared_ptr_utils.h - ${CMAKE_CURRENT_SOURCE_DIR}/move_wrapper.h ${CMAKE_CURRENT_SOURCE_DIR}/noncopyable.h ${CMAKE_CURRENT_SOURCE_DIR}/singleton.h ) diff --git a/libtransport/includes/hicn/transport/utils/move_wrapper.h b/libtransport/includes/hicn/transport/utils/move_wrapper.h deleted file mode 100644 index 73389948d..000000000 --- a/libtransport/includes/hicn/transport/utils/move_wrapper.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2021 Cisco and/or its affiliates. - * - * 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 <type_traits> - -namespace utils { - -template <typename F> -struct MoveWrapper : F { - MoveWrapper(F&& f) : F(std::move(f)) {} - ~MoveWrapper() = default; - - MoveWrapper(MoveWrapper&&) = default; - MoveWrapper& operator=(MoveWrapper&&) = default; - - MoveWrapper(const MoveWrapper&); - MoveWrapper& operator=(const MoveWrapper&); -}; - -template <typename T> -auto moveHandler(T&& t) -> MoveWrapper<typename std::decay<T>::type> { - return std::move(t); -} -} // namespace utils
\ No newline at end of file |