Comments (6)
i think we should add a basic travis and appveyor for CI verification
from refl-cpp.
That does seem like a compiler bug. Could you please add some more details about which compiler version and what flags you are using?
from refl-cpp.
clang 8.0.1
and for flags
add_library(antara_error_settings INTERFACE)
# Using namespaces causes CMake to error our in case of typos on the
# consuming side, very important.
add_library(antara::error_settings ALIAS antara_error_settings)
##! We use only clang for simplicity
target_compile_options(
antara_error_settings
INTERFACE
$<$<AND:$<PLATFORM_ID:Linux>,$<CXX_COMPILER_ID:Clang>>:-Wall -Wextra -Wfatal-errors>
$<$<AND:$<PLATFORM_ID:Darwin>,$<CXX_COMPILER_ID:Clang>>:-Wall -Wextra -Wfatal-errors>
$<$<AND:$<PLATFORM_ID:Windows>,$<CXX_COMPILER_ID:Clang>>:/W4 /permissive->)
##! We are using C++ 17 for all of our targets
add_library(antara_defaults_features INTERFACE)
add_library(antara::defaults_features ALIAS antara_defaults_features)
target_compile_features(antara_defaults_features INTERFACE cxx_std_17)
add_library(antara_optimize_settings INTERFACE)
add_library(antara::optimize_settings ALIAS antara_optimize_settings)
##! Msvc flags info
# /Zi - Produces a program database (PDB) that contains type information and symbolic debugging information for use with the debugger.
# /FS - Allows multiple cl.exe processes to write to the same .pdb file
# /DEBUG - Enable debug during linking
# /Od - Disables optimization
# /Ox - Full optimization
# /Oy- do not suppress frame pointers (recommended for debugging)
target_compile_options(antara_optimize_settings INTERFACE
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:-O0 -g>
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Linux>>:-O2 -march=native>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:-O0 -g>
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Darwin>>:-O2 -march=native>
$<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>>:/Zi /FS /DEBUG /Od /MDd /Oy->
$<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:Clang>,$<PLATFORM_ID:Windows>>:/O2 -DNDEBUG>
)
## Cross filesystem
add_library(antara_cross_filesystem INTERFACE)
add_library(antara::cross_filesystem ALIAS antara_cross_filesystem)
target_link_libraries(antara_cross_filesystem INTERFACE
$<$<AND:$<PLATFORM_ID:Linux>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>
$<$<PLATFORM_ID:Darwin>:c++fs>)
add_library(antara_default_settings INTERFACE)
add_library(antara::default_settings ALIAS antara_default_settings)
target_link_libraries(antara_default_settings INTERFACE antara::error_settings antara::optimize_settings antara::defaults_features antara::cross_filesystem)
from refl-cpp.
-O0 -march=native -g -DDEBUG in debug
-02 -march=native -DRELEASE in Release
from refl-cpp.
It seems that Clang is ahead of the game in regards to N3797 §8.5/7:
If a program calls for the default initialization of an object of a const-qualified type T, T shall be a class type with a user-provided default constructor.
std::optional::optional
is implicitly-declared and std::optional
is used by refl::attr::property
, whose constructor is also implicitly-declared.
Explicitly defining property's default constructor fixes this.
from refl-cpp.
Fixed in 4eaaeb2.
from refl-cpp.
Related Issues (20)
- GetDateFormat getter vs. the Win32 API HOT 2
- Use of `get_reader` and `has_writer` produces absurdly long compile times HOT 18
- Q: make REFL_AUTO, REFL_TYPE etc. callable from nested namespace HOT 7
- Port to vcpkg HOT 3
- Fix warnings for strict variadic macro checks (stronger C++20 enforcement)
- refl::util::detail::filter(..) inverts order of member list HOT 2
- Is there a way to reflect private fields? HOT 5
- Q: how to reflect on member functions' parameters and return types? HOT 5
- Is there a possibility of adding features like Boost.PFR? HOT 3
- Ability to break class declarations up HOT 9
- How to implement my case with this library? HOT 1
- Question. a generic getter function for reflected type HOT 1
- Enum reflection HOT 2
- Access member descriptor from pointer-to-member HOT 4
- Field offsetof HOT 4
- Member list empty when using reflect<T>(), but works fine with reflect(const T&) HOT 1
- How to resolve the non-const signature of a class method. HOT 2
- Q: Implementing a member attribute for "Default value" to use in ctors
- (unknown)** that is all i get for typename HOT 1
- Deleted HOT 1
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 refl-cpp.