Mantid
Loading...
Searching...
No Matches
FallbackBoostOptionalIO.h
Go to the documentation of this file.
1// Copyright © 2022 ISIS Rutherford Appleton Laboratory UKRI,
2// NScD Oak Ridge National Laboratory, European Spallation Source,
3// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
4// SPDX - License - Identifier: GPL - 3.0 +
5#pragma once
6
7#include <boost/optional.hpp>
8#include <ostream>
9
10// Here we provide a printer for boost::optional that can be used
11// in cases where the output is not interesting, e.g.
12// it is a requirement by GoogleMock
13
14namespace boost {
15
17template <class CharType, class CharTrait, class OptionalValueType>
18inline std::basic_ostream<CharType, CharTrait> &operator<<(std::basic_ostream<CharType, CharTrait> &os,
19 boost::optional<OptionalValueType> const &value) {
20 return (os << "boost::optional @ " << reinterpret_cast<const void *>(&value));
21}
22} // namespace boost
double value
The value of the point.
Definition: FitMW.cpp:51
Definition: NDArray.h:49
std::basic_ostream< CharType, CharTrait > & operator<<(std::basic_ostream< CharType, CharTrait > &os, boost::optional< OptionalValueType > const &value)
Simple prints the address of the optional object.