ChimeraTK-DeviceAccess 03.26.00
Loading...
Searching...
No Matches
Void.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include <istream>
6#include <ostream>
7
8namespace ChimeraTK {
9
10 /********************************************************************************************************************/
11
15 class Void {
16 public:
17 Void() = default;
18 Void& operator=(const Void&) = default;
19 Void(const Void&) = default;
20 };
21
22 /********************************************************************************************************************/
23
24 inline std::istream& operator>>(std::istream& is, __attribute__((unused)) Void& value) {
25 return is;
26 }
27
28 /********************************************************************************************************************/
29
30 inline std::ostream& operator<<(std::ostream& os, __attribute__((unused)) Void& value) {
31 os << 0;
32 return os;
33 }
34
35 /********************************************************************************************************************/
36
37} // namespace ChimeraTK
Wrapper Class for void.
Definition Void.h:15
Void & operator=(const Void &)=default
Void(const Void &)=default
Void()=default
std::ostream & operator<<(std::ostream &stream, const DataDescriptor::FundamentalType &fundamentalType)
std::istream & operator>>(std::istream &is, Boolean &value)
Definition Boolean.h:34