mirror of
https://github.com/boostorg/optional.git
synced 2025-07-29 12:07:21 +02:00
none_t is no loner constructible from literal 0
This caused problems because: optional<T> o = 0; always worked. But often it would create an uninitialized optional.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
|
||||
// Copyright (C) 2014 Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -14,9 +15,12 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
|
||||
namespace detail { struct none_helper{}; }
|
||||
|
||||
typedef int detail::none_helper::*none_t ;
|
||||
#else
|
||||
class none_t {};
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
Reference in New Issue
Block a user