template <typename Context>
basic_scan_arg class
Type-erased scanning argument.
Contains a pointer to the value contained in a scan_arg_store
.
Public types
- class handle
Constructors, destructors, conversion operators
- basic_scan_arg() defaulted constexpr
- Construct a
basic_
which doesn't contain an argument.scan_ arg - operator bool() const explicit constexpr noexcept
Public functions
-
template <typename Visitor>auto visit(Visitor&& vis) → decltype(auto) constexpr
Function documentation
template <typename Context>
scn::basic_scan_arg::operator bool() const explicit constexpr noexcept
Returns | true if *this contains an argument |
---|
template <typename Context>
template <typename Visitor>
decltype(auto) scn::basic_scan_arg::visit(Visitor&& vis) constexpr
template <typename Visitor>
Returns | vis(x) , where x is either a reference to the value contained in *this , or a basic_scan_arg:: . |
---|
Visit a basic_
with Visitor
. Calls vis
with the value stored in *this
. If no value is contained in *this
, calls vis
with a monostate
.