mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
optional impl alignment requirements?? Thanks, Emscripten.
This commit is contained in:
parent
e1329d244a
commit
428adf706f
|
@ -20,8 +20,8 @@
|
||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// This file was generated with a script.
|
// This file was generated with a script.
|
||||||
// Generated 2016-12-16 05:28:22.940422 UTC
|
// Generated 2016-12-16 06:00:39.206011 UTC
|
||||||
// This header was generated with sol v2.15.5 (revision bbcbd41)
|
// This header was generated with sol v2.15.5 (revision e1329d2)
|
||||||
// https://github.com/ThePhD/sol2
|
// https://github.com/ThePhD/sol2
|
||||||
|
|
||||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||||
|
@ -2089,8 +2089,8 @@ namespace sol {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct optional_base {
|
struct alignas(T) optional_base {
|
||||||
char storage_[sizeof(T) + (sizeof(T) % alignof(T))];
|
char storage_[sizeof(T)];
|
||||||
bool init_;
|
bool init_;
|
||||||
|
|
||||||
constexpr optional_base() noexcept : storage_(), init_(false) {};
|
constexpr optional_base() noexcept : storage_(), init_(false) {};
|
||||||
|
@ -2137,8 +2137,8 @@ namespace sol {
|
||||||
using constexpr_optional_base = optional_base<T>;
|
using constexpr_optional_base = optional_base<T>;
|
||||||
#else
|
#else
|
||||||
template <class T>
|
template <class T>
|
||||||
struct constexpr_optional_base {
|
struct alignas(T) constexpr_optional_base {
|
||||||
char storage_[sizeof(T) + (sizeof(T) % alignof(T))];
|
char storage_[sizeof(T)];
|
||||||
bool init_;
|
bool init_;
|
||||||
constexpr constexpr_optional_base() noexcept : storage_(), init_(false) {}
|
constexpr constexpr_optional_base() noexcept : storage_(), init_(false) {}
|
||||||
|
|
||||||
|
|
|
@ -287,8 +287,8 @@ namespace sol {
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct optional_base {
|
struct alignas(T) optional_base {
|
||||||
char storage_[sizeof(T) + (sizeof(T) % alignof(T))];
|
char storage_[sizeof(T)];
|
||||||
bool init_;
|
bool init_;
|
||||||
|
|
||||||
constexpr optional_base() noexcept : storage_(), init_(false) {};
|
constexpr optional_base() noexcept : storage_(), init_(false) {};
|
||||||
|
@ -335,8 +335,8 @@ namespace sol {
|
||||||
using constexpr_optional_base = optional_base<T>;
|
using constexpr_optional_base = optional_base<T>;
|
||||||
#else
|
#else
|
||||||
template <class T>
|
template <class T>
|
||||||
struct constexpr_optional_base {
|
struct alignas(T) constexpr_optional_base {
|
||||||
char storage_[sizeof(T) + (sizeof(T) % alignof(T))];
|
char storage_[sizeof(T)];
|
||||||
bool init_;
|
bool init_;
|
||||||
constexpr constexpr_optional_base() noexcept : storage_(), init_(false) {}
|
constexpr constexpr_optional_base() noexcept : storage_(), init_(false) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user