Comments (5)
Are you able to compile it with
libc++
because I don't support it, the reason is that I wasn't able to compile a simple hello world programs with c++2a two years ago.I don't have any plans to add
libc++
support in the near future, it will cost much more effort to add it correctly.The problem is as you wrote, I agree with that.
Much better would be something like this:
namespace std { #if defined(_LIBCPP_VERSION) && defined(_LIBCPP_TEMPLATE_VIS) template<typename ...Types> class _LIBCPP_TEMPLATE_VIS variant; // NOLINT(bugprone-forwarding-reference-overload) #else template<typename ...Types> class variant; // NOLINT(bugprone-forwarding-reference-overload) #endif } // namespace stdCan you try it if it compiles correctly? Thx
It fails to compile, reproducing the same error the OP has.
from tinyorm.
Hi, macOS isn't supported as I don't have any macOS so I can't test it.
What compiler and which version do you use? I assume it's the Apple Clang. Which c++ library this compiler uses, it's libstdc++
or libc++
? I'm asking because I know nothing about macOS c++ dev. env.
from tinyorm.
Hi,
I can reproduce this on FreeBSD, using clang++ and libc++
It's caused by the _LIBCPP_TEMPLATE_VIS
macro used by std::variant
as defined in <variant>
to become
class __attribute__((__type_visibility__("default"))) variant;
while std::variant
as defined in orm/ormconcepts.hpp:20 instead becomes
class __attribute__((__visibility__("hidden"))) variant;
where the hidden originates in the CXX_VISIBILITY_PRESET used by TinyORM.
Including <variant>
instead of prototyping std::variant
fixes this build failure.
from tinyorm.
Are you able to compile it with libc++
because I don't support it, the reason is that I wasn't able to compile a simple hello world programs with c++2a two years ago.
I don't have any plans to add libc++
support in the near future, it will cost much more effort to add it correctly.
The problem is as you wrote, I agree with that.
Much better would be something like this:
namespace std
{
#if defined(_LIBCPP_VERSION) && defined(_LIBCPP_TEMPLATE_VIS)
template<typename ...Types>
class _LIBCPP_TEMPLATE_VIS variant; // NOLINT(bugprone-forwarding-reference-overload)
#else
template<typename ...Types>
class variant; // NOLINT(bugprone-forwarding-reference-overload)
#endif
} // namespace std
Can you try it if it compiles correctly? Thx
from tinyorm.
I should merge it much sooner, that forward declaration was not a good idea anyway. Is merged to develop now.
from tinyorm.
Related Issues (20)
- compilation error HOT 6
- Tests don't compile if ORM is disabled HOT 3
- Aggressive "warnings" flags exported by the TinyOrm::TinyOrm target HOT 4
- Tom application referenced in TinyORM: Getting Started but not getting installed HOT 4
- Assertive TinyOrmConfig.cmake breaks static builds HOT 9
- Insufficiently escaped comment in tinytypes.hpp HOT 2
- VCPKG misplaces debug target export file HOT 2
- Support for Mac OS X, *BSD, and other libc++ environment HOT 3
- VCPKG upstream integration HOT 23
- VCPKG installs header files redundandly HOT 1
- [cmake] Installing mdx documentation HOT 8
- Tag the releases HOT 4
- GitHub Actions ubuntu compilation failure HOT 1
- redefinition of ‘bool __tls_guard’ in orm/tiny/concerns/hasattributes.hpp:412 HOT 1
- Add interface wrapper for CREATE IF NOT EXISTS HOT 2
- Classify Logs HOT 1
- DB::beginTransaction assert()-ing HOT 1
- Column and Table alias assigning HOT 4
- Many-to-many and wrong detach() overload? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyorm.