Skip to content

Commit

Permalink
Merge branch 'master' into fix_variant_default_contructed_state
Browse files Browse the repository at this point in the history
  • Loading branch information
fermentedfly authored Jan 31, 2024
2 parents 9fc7a34 + 8403165 commit bbfd201
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
The MIT License (MIT)

Copyright (c) 2016 jwellbelove, https://github.com/ETLCPP/etl, http://www.etlcpp.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
10 changes: 8 additions & 2 deletions include/etl/optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,10 @@ namespace etl
{
if (this != &other)
{
storage.value = other.storage.value;
if (other.valid)
{
storage.value = other.storage.value;
}
valid = other.valid;
}

Expand All @@ -783,7 +786,10 @@ namespace etl
{
if (this != &other)
{
storage.value = etl::move(other.storage.value);
if (other.valid)
{
storage.value = etl::move(other.storage.value);
}
valid = other.valid;
}

Expand Down

0 comments on commit bbfd201

Please sign in to comment.