-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gbc c++] Apply export attribute to enum functions
Resolves #861
- Loading branch information
1 parent
52deb69
commit 101a8f5
Showing
10 changed files
with
977 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
#pragma once | ||
|
||
#include <bond/core/bond_version.h> | ||
|
||
#if BOND_VERSION < 0x0700 | ||
#error This file was generated by a newer version of the Bond compiler and is incompatible with your version of the Bond library. | ||
#endif | ||
|
||
#if BOND_MIN_CODEGEN_VERSION > 0x0b00 | ||
#error This file was generated by an older version of the Bond compiler and is incompatible with your version of the Bond library. | ||
#endif | ||
|
||
#include <bond/core/config.h> | ||
#include <bond/core/containers.h> | ||
|
||
|
||
#include "basic_types_types.h" | ||
#include "namespace_basic_types_types.h" | ||
|
||
namespace tests | ||
{ | ||
|
||
struct dummy | ||
{ | ||
int32_t count; | ||
|
||
dummy() | ||
: count() | ||
{ | ||
} | ||
|
||
|
||
// Compiler generated copy ctor OK | ||
dummy(const dummy&) = default; | ||
|
||
#if defined(_MSC_VER) && (_MSC_VER < 1900) // Versions of MSVC prior to 1900 do not support = default for move ctors | ||
dummy(dummy&& other) | ||
: count(std::move(other.count)) | ||
{ | ||
} | ||
#else | ||
dummy(dummy&&) = default; | ||
#endif | ||
|
||
|
||
#if defined(_MSC_VER) && (_MSC_VER < 1900) // Versions of MSVC prior to 1900 do not support = default for move ctors | ||
dummy& operator=(dummy other) | ||
{ | ||
other.swap(*this); | ||
return *this; | ||
} | ||
#else | ||
// Compiler generated operator= OK | ||
dummy& operator=(const dummy&) = default; | ||
dummy& operator=(dummy&&) = default; | ||
#endif | ||
|
||
bool operator==(const dummy& other) const | ||
{ | ||
return true | ||
&& (count == other.count); | ||
} | ||
|
||
bool operator!=(const dummy& other) const | ||
{ | ||
return !(*this == other); | ||
} | ||
|
||
void swap(dummy& other) | ||
{ | ||
using std::swap; | ||
swap(count, other.count); | ||
} | ||
|
||
struct Schema; | ||
|
||
protected: | ||
void InitMetadata(const char*, const char*) | ||
{ | ||
} | ||
}; | ||
|
||
inline void swap(::tests::dummy& left, ::tests::dummy& right) | ||
{ | ||
left.swap(right); | ||
} | ||
} // namespace tests | ||
|
Oops, something went wrong.