Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop obtain_from and use either ctors or .as<>
- Loading branch information
Showing
26 changed files
with
190 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* This software is distributed under BSD 3-clause license (see LICENSE file). | ||
* | ||
* Authors: Viktor Gal | ||
*/ | ||
|
||
#ifndef __SG_MACROS_H__ | ||
#define __SG_MACROS_H__ | ||
|
||
#if defined(__GNUC__) || defined(__APPLE__) | ||
#define SG_FORCED_INLINE inline __attribute__((always_inline)) | ||
#define SG_FORCED_PACKED __attribute__((__packed__)) | ||
#elif defined(_MSC_VER) | ||
#define SG_FORCED_INLINE __forceinline | ||
#define SG_FORCED_PACKED | ||
#else | ||
#define SG_FORCED_INLINE | ||
#define SG_FORCED_PACKED | ||
#endif | ||
|
||
// a quick macro for making sure that an object | ||
// does not have a copy-ctor and operator= | ||
#define SG_DELETE_COPY_AND_ASSIGN(TypeName) \ | ||
TypeName(const TypeName&) = delete; \ | ||
void operator=(const TypeName&) = delete | ||
|
||
#ifndef SWIG | ||
#define SG_DEPRECATED(message) [[deprecated(message)]] | ||
#else | ||
#define SG_DEPRECATED(message) | ||
#endif | ||
|
||
#endif |
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
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
Oops, something went wrong.