Not able to build program with arduino program under clion I'm pretty new to arduino and I just downloaded clion and installed the arduino plugin so I have an IDE that I'm used to. Here is my code:
#include &lt;Arduino.h&gt;

// Time between a switch indicating not full and the time a valve is opened
#define SWITCH_DELAY 5000

#define PIN_SWITCH 2
#define PIN_GREEN 3
#define PIN_YELLOW 4

#define INT16 int
#define UINT16 unsigned int
#define UINT32 unsigned long

DelayChecker    degassingChecker(PIN_SWITCH, PIN_GREEN);

void setup() {
    pinMode(PIN_SWITCH, INPUT);
    pinMode(PIN_GREEN, OUTPUT);
    pinMode(PIN_YELLOW, OUTPUT);

    Serial.begin(9600);
    Serial.print(&quot;UINT16: &quot; + sizeof(UINT16));
    Serial.print(&quot;UINT32: &quot; + sizeof(UINT32));
}

void loop() {
    UINT32 now = millis();

    degassingChecker.check(now);
}

public class DelayChecker {
    private:
        UINT32 delayExpires = 0;
        UINT16 switchId = 0;
        UINT16 solenoidId = 0;
        bool solenoidOn = false;

    public:
        DelayChecker(const unsigned int sw, const unsigned int sol) {
            switchId = sw;
            solenoidId = sol;
        }

        void check(const UINT32 now) {
            if (delayExpires == 0) {
                INT16 switchState = digitalRead(switchId);
                if (switchState == LOW) {
                    delayExpires = millis() + SWITCH_DELAY;
                    digitalWrite(PIN_YELLOW, HIGH);
                }
            }
            else {
                if (now &gt;= delayExpires) {
                    INT16 switchState = digitalRead(switchId);
                    if (switchState == LOW) {
                        if (!solenoidOn) {
                            digitalWrite(solenoidId, HIGH);
                            solenoidOn = true;
                        }
                    }
                    else {
                        if (solenoidOn) {
                            digitalWrite(solenoidId, LOW);
                            solenoidOn = false;
                        }
                    }
                }
            }
        }
};

I hit the run button and get the following.
====================[ Build | untitled1 | Debug ]===============================
/opt/clion/bin/cmake/linux/bin/cmake --build /home/thomas/CLionProjects/untitled1/cmake-build-debug --target untitled1 -- -j 12
[  7%] Building C object CMakeFiles/uno_CORE.dir/opt/arduino-1.8.13/hardware/arduino/avr/cores/arduino/wiring_pulse.c.obj
[  7%] Building CXX object CMakeFiles/uno_CORE.dir/opt/arduino-1.8.13/hardware/arduino/avr/cores/arduino/new.cpp.obj
[ 10%] Building C object CMakeFiles/uno_CORE.dir/opt/arduino-1.8.13/hardware/arduino/avr/cores/arduino/wiring_shift.c.obj
/opt/arduino-1.8.13/hardware/arduino/avr/cores/arduino/new.cpp:29:46: error: expected initializer before 'noexcept'
 void * operator new(size_t size, void * ptr) noexcept {
                                              ^~~~~~~~
gmake[3]: *** [CMakeFiles/uno_CORE.dir/build.make:317: CMakeFiles/uno_CORE.dir/opt/arduino-1.8.13/hardware/arduino/avr/cores/arduino/new.cpp.obj] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:99: CMakeFiles/uno_CORE.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:133: CMakeFiles/untitled1.dir/rule] Error 2
gmake: *** [Makefile:151: untitled1] Error 2

It looks like an error in the libraries. Has anyone seen anything like this?
I found a github issue fixing this error : https://github.com/vsch/CLionArduinoPlugin/issues/36
It worked for me