Lines Matching full:optional

29 #include "utils/optional.ipp"
37 using utils::optional;
52 /// Constructs a new optional object.
90 /// Constructs and returns an optional object.
95 /// \tparam Type The type of the object included in the optional wrapper.
96 /// \param value The value to put inside the optional wrapper.
98 /// \return The constructed optional object.
100 optional< Type >
103 return optional< Type >(value); in return_optional()
113 const optional< int > no_args; in ATF_TEST_CASE_BODY()
116 const optional< int > with_none(none); in ATF_TEST_CASE_BODY()
119 const optional< int > with_arg(3); in ATF_TEST_CASE_BODY()
123 const optional< int > copy_none(with_none); in ATF_TEST_CASE_BODY()
126 const optional< int > copy_arg(with_arg); in ATF_TEST_CASE_BODY()
135 const optional< std::string > no_args; in ATF_TEST_CASE_BODY()
138 const optional< std::string > with_none(none); in ATF_TEST_CASE_BODY()
141 const optional< std::string > with_arg("foo"); in ATF_TEST_CASE_BODY()
145 const optional< std::string > copy_none(with_none); in ATF_TEST_CASE_BODY()
148 const optional< std::string > copy_arg(with_arg); in ATF_TEST_CASE_BODY()
157 optional< int > from_default; in ATF_TEST_CASE_BODY()
158 from_default = optional< int >(); in ATF_TEST_CASE_BODY()
161 optional< int > from_none(3); in ATF_TEST_CASE_BODY()
165 optional< int > from_int; in ATF_TEST_CASE_BODY()
174 optional< long > from_return(return_optional< long >(123)); in ATF_TEST_CASE_BODY()
185 optional< test_alloc > optional1(test_alloc(3)); in ATF_TEST_CASE_BODY()
190 optional< test_alloc > optional2(optional1); in ATF_TEST_CASE_BODY()
210 optional< std::string > optional; in ATF_TEST_CASE_BODY() local
211 ATF_REQUIRE(&def_value == &optional.get_default(def_value)); in ATF_TEST_CASE_BODY()
212 optional = "bye"; in ATF_TEST_CASE_BODY()
213 ATF_REQUIRE_EQ("bye", optional.get_default(def_value)); in ATF_TEST_CASE_BODY()
220 optional< int > opt = utils::make_optional(576); in ATF_TEST_CASE_BODY()
229 optional< int > opt1, opt2; in ATF_TEST_CASE_BODY()
258 str << optional< int >(none); in ATF_TEST_CASE_BODY()
263 str << optional< int >(5); in ATF_TEST_CASE_BODY()
268 str << optional< std::string >("this is a text"); in ATF_TEST_CASE_BODY()