Arduino std::list problem

I am making a class which involves implementing a protocol. But after 2 days of googling and trying to find the solution I have come here as my last hope.

Here is the problem:

#ifndef _FSM_
#define _FSM_
#include <list>
#include "Timer.h"
#include "Event.h"
#include <XBee.h>
#include <Arduino.h>
#include "FSM.h"
#include <StandardCplusplus.h>




class FSM {
public:	
	
	states state;	
	XBee *xbee;    
        unsigned long time;	
	FSM(XBee *xbee);
         std::list<int> timerList;
	void processEvent(Event *event);	
	void onMqttsPublishInIdle(Event *event);
	void onMqttsSendPublish(Event *event);
	void onMqttsSendRegister(Event *event);
	void onMqttsRegACK(Event *event);
	void onMqttsPubACK(Event *event);
	
private:
	uint16_t msgId;
};
#endif

This gives me following error:

FSM.h : ISO C++ forbids declaration of 'list' with no type
FSM.h : '
FSM.h : expected ';' before '<' token

I am hopeless. Please help.

Can you post the complete compiler output? Usually it would include line numbers.

Also, please give links to any non-standard libraries you're using.

Was that the source for FSM.h? Why was it #including FSM.h? Is states defined as a type somewhere?

I suggest you turn on verbose output during compilation, see what the temporary directory is and see what .cpp source the IDE has generated for your sketch. The IDE's code mangler is pretty dumb and could easily have screwed up your template declaration.

Im sorry that FSM.h was there by mistake. I was trying something and it was leftover.

This is actually FSM.h.

#ifndef _FSM_
#define _FSM_
#include <list>
#include "Timer.h"
#include "Event.h"
#include <XBee.h>
#include <Arduino.h>

class FSM {
public:	
	
	states state;	
	XBee *xbee;    
    unsigned long time;	
	FSM(XBee *xbee);
        std::list<int> timerList;
	void processEvent(Event *event);	
	void onMqttsPublishInIdle(Event *event);
	void onMqttsSendPublish(Event *event);
	void onMqttsSendRegister(Event *event);
	void onMqttsRegACK(Event *event);
	void onMqttsPubACK(Event *event);	
private:
	uint16_t msgId;
};
#endif
In file included from Client.ino:2:
FSM.h:20: error: ISO C++ forbids declaration of 'list' with no type
FSM.h:20: error: invalid use of '::'
FSM.h:20: error: expected ';' before '<' token

Here is a full error from Arduino IDE. I actually use Atmel studio for developing applications and he doesn't print line number. Why can't i declare a list?

You can if you install the STL.

Dear God. THANK YOU. OH MY GOD I WAS BUSTING MY HEAD WITH THIS FOR SO LONG!!!!