Mantid
Loading...
Searching...
No Matches
Framework
TestHelpers
inc
MantidFrameworkTestHelpers
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 <optional>
8
#include <ostream>
9
10
// Here we provide a printer for std::optional that can be used
11
// in cases where the output is not interesting, e.g.
12
// it is a requirement by GoogleMock
13
14
namespace
boost
{
15
17
template
<
class
CharType,
class
CharTrait,
class
OptionalValueType>
18
inline
std::basic_ostream<CharType, CharTrait> &
operator<<
(std::basic_ostream<CharType, CharTrait> &os,
19
std::optional<OptionalValueType>
const
&
value
) {
20
return
(os <<
"std::optional @ "
<<
reinterpret_cast<
const
void
*
>
(&
value
));
21
}
22
23
}
// namespace boost
value
double value
The value of the point.
Definition
FitMW.cpp:51
boost
Definition
NDArray.h:49
boost::operator<<
std::basic_ostream< CharType, CharTrait > & operator<<(std::basic_ostream< CharType, CharTrait > &os, std::optional< OptionalValueType > const &value)
Simple prints the address of the optional object.
Definition
FallbackBoostOptionalIO.h:18
Generated by
1.9.8