mirror of
https://github.com/ETLCPP/etl.git
synced 2026-07-30 16:26:17 +08:00
Fix ODR violation in optional (#1522)
* Fix ODR violation in optional Detected by GCC 15, when using in a module context. * Make etl::nullopt constant
This commit is contained in:
parent
c1cab856a8
commit
52502734fa
@ -59,7 +59,7 @@ namespace etl
|
||||
|
||||
// Convertible to any type of null non-member pointer.
|
||||
template <class T>
|
||||
operator T*() const
|
||||
ETL_CONSTEXPR operator T*() const ETL_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -74,7 +74,7 @@ namespace etl
|
||||
/// A null option.
|
||||
///\ingroup utilities
|
||||
//*****************************************************************************
|
||||
const nullopt_t nullopt = {};
|
||||
ETL_INLINE_VAR ETL_CONSTANT nullopt_t nullopt = {};
|
||||
|
||||
//***************************************************************************
|
||||
/// Exception for optional.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user