diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2015-09-30 16:14:32 -0400 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-09-30 15:34:40 -0700 |
commit | b46c102eb0ec3ca2ff0b422831cb98fa2bdebcba (patch) | |
tree | 3525ee2dba9e77fadedda73446a549ac8ebddda5 /include/mbgl/util/variant_io.hpp | |
parent | 3d57f3ea7c6ae1f098668c37a8c5f79638b0e527 (diff) | |
download | qtlocation-mapboxgl-b46c102eb0ec3ca2ff0b422831cb98fa2bdebcba.tar.gz |
mason variant@1.0
Diffstat (limited to 'include/mbgl/util/variant_io.hpp')
-rw-r--r-- | include/mbgl/util/variant_io.hpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/include/mbgl/util/variant_io.hpp b/include/mbgl/util/variant_io.hpp deleted file mode 100644 index 224732d97c..0000000000 --- a/include/mbgl/util/variant_io.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef MAPBOX_UTIL_VARIANT_IO_HPP -#define MAPBOX_UTIL_VARIANT_IO_HPP - -#include "variant.hpp" - -namespace mapbox { namespace util { - -namespace detail { -// operator<< helper -template <typename Out> -class printer -{ -public: - explicit printer(Out & out) - : out_(out) {} - printer& operator=(printer const&) = delete; - -// visitor - template <typename T> - void operator()(T const& operand) const - { - out_ << operand; - } -private: - Out & out_; -}; -} - -// operator<< -template <typename charT, typename traits, typename... Types> -VARIANT_INLINE std::basic_ostream<charT, traits>& -operator<< (std::basic_ostream<charT, traits>& out, variant<Types...> const& rhs) -{ - detail::printer<std::basic_ostream<charT, traits>> visitor(out); - apply_visitor(visitor, rhs); - return out; -} - -}} - -#endif //MAPBOX_UTIL_VARIANT_IO_HPP |