Skip to content

Commit

Permalink
remove none_type and its complicated typedef from detail namespace, a…
Browse files Browse the repository at this point in the history
…dd it as private member class to optional
  • Loading branch information
DennisOSRM committed Aug 27, 2014
1 parent 7242396 commit c5f7205
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@

namespace mapbox { namespace util {

namespace detail {
struct none_helper{};
}

template<typename T>
class optional {
static_assert(!std::is_reference<T>::value, "optional doesn't support references");

typedef int detail::none_helper::*none_type;
struct none_type { };

variant<none_type, T> variant_;

Expand Down

0 comments on commit c5f7205

Please sign in to comment.