8000 ETL_NO_STL includes <new> (not existing on Arduino) · Issue #222 · ETLCPP/etl · GitHub
[go: up one dir, main page]

Skip to content
ETL_NO_STL includes <new> (not existing on Arduino) #222
@eudoxos

Description

@eudoxos

I am testing ETL (latest git, not installed through the library manager) with Arduino (tools version 1.8.2, not using the IDE but Arduino-Makefile instead), having done #define ETL_NO_STL in etl_profile.h. I am getting

./libraries/etl/include/etl/memory.h:45:10: fatal error: new: No such file or directory

I tried to work around this by using ArduinoSTL, but that one won't compile with c++17.

I was looking at configuration options (and the source) and did not see a way to avoid inclusion of <new>. I created an empty file new to make the preprocessor happy and with some extra definitions, the compilation went fine:

#define HUGE_VALF (__builtin_huge_valf())
#define HUGE_VALL (__builtin_huge_vall())
#define HUGE_VAL (__builtin_huge_val())
#define nanf __builtin_nanf
#define nanl __builtin_nanl
#define nan __builtin_nan
#undef min
#undef max
#include<etl/cstring.h>
#include<etl/algorithm.h>
using etl::min;
using etl::max;

Am I the only one facing issues? No other Arduino users?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0