Comments (9)
Hi there! Any reaction on this?
from etl.
Sorry to be so late in replying, but I've been on holiday in India for the last two weeks and I had very limited internet access!
It looks like the GCC version you are using doesn't support static_assert. At the moment the header assumes that GCC supports this. I will have to add some macro definitions to check the GCC version, but in the mean time you could comment out the following lines in static_assert.h
#elif defined(ETL_COMPILER_GCC)
#define STATIC_ASSERT(Condition, Message) static_assert(Condition, Message)
I have a few other fixes and improvements to upload, but a glitch with Git just before I went away meant I will have to rebuild a few of them. :-(
from etl.
I am using g++-5 (Homebrew gcc5 5.4.0) 5.4.0 - this version supports static_assert
.
from etl.
OK, I think I get what the problem is, but I'm not sure of the solution as yet.
from etl.
Does your configuration have -std=c++11 set?
from etl.
from etl.
The problem seems to be that GCC doesn't like this code...
template <std::size_t I, typename T, std::size_t MAXN>
inline T& get(array<T, MAXN>& a)
{
static_assert(I < MAXN, "Index out of bounds"); <<<<<<<<<<<<<<<<<<<
return a[I];
}
error: there are no arguments to 'static_assert' that depend on a template parameter, so a declaration of 'static_assert' must be available [-fpermissive]
The call to static assert already depends on template non-type parameters I & MAXN.
I'm assuming that it must depend on either 'a' or maybe the type T too?
I need to experiment.
You could either comment out the STATIC_ASSERT macro as previously mentioned of temporarily comment out the STATIC_ASSERTs in etl::array until I have a solution.
from etl.
I can only get this to fail if I select "-std=c++98"
If I select "-std=c++11" then I get no warnings.
from etl.
I tried again with the most recent release. The error does not occur any more. I am puzzled. Sorry for troubling you.
I now try to get the JSON library to compile with ETL.
from etl.
Related Issues (20)
- Add has_active_timer to callback_timer HOT 6
- [`string_stream`] Missing initializers for const format specifiers `etl::left` and `etl::right`
- unordered_map inside class triggers segmentation fault HOT 7
- HFSM: How do I get information about the parent from the child state? HOT 6
- Strange expression in volatile atomic operator -- HOT 2
- absolute include path in optional.h HOT 1
- expected::emplace methods are missing return HOT 1
- `etl::variant` always has a non-trivial destructor HOT 3
- cyclic_value first/last methods HOT 2
- etl::variant is missing comparison operators HOT 2
- `etl::fsm` `receive` function can call `p_state->process_event()` also when `p_state` is nullptr HOT 5
- Any plans for `shared_ptr`, `make_unique`, etc? HOT 4
- feature request: callback on timer functions to handle changes in the time list HOT 4
- Allow removal of a node from an etl::intrusive_list HOT 1
- Side effects concern etl::string HOT 6
- ETL Functional How to use? HOT 2
- optimize find_first_not_of and find_last_not_of on string_view HOT 1
- Error using etl::optional::emplace with objects with const members HOT 1
- feature request: allow use of etl::mutex on non-OS targets HOT 1
- Add etl::partition and etl::nth_element algorithms 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 etl.