Vowpal Wabbit
options_serializer_boost_po.cc
Go to the documentation of this file.
2 
3 using namespace VW::config;
4 
5 std::string options_serializer_boost_po::str() { return m_output_stream.str(); }
6 
7 const char* options_serializer_boost_po::data() { return m_output_stream.str().c_str(); }
8 
9 size_t options_serializer_boost_po::size() { return m_output_stream.str().size(); }
10 
11 void options_serializer_boost_po::add(base_option& option) { add_impl<supported_options_types>(option); }
12 
13 template <>
14 void options_serializer_boost_po::serialize<bool>(typed_option<bool>& typed_option)
15 {
16  if (typed_option.value())
17  {
19  }
20 }
21 
22 template <>
23 void options_serializer_boost_po::add_impl<typelist<>>(base_option&)
24 {
25  THROW("That is an unsupported option type.");
26 }
std::string m_name
Definition: options.h:17
typed_option & value(T value)
Definition: options.h:63
virtual void add(base_option &option) override
#define THROW(args)
Definition: vw_exception.h:181