#pragma once
is not working properly when compiling a project I have been working on. Having read up on the topic a bit, I saw that the one downside to using it is that if the same file is in different locations then it will not work like the other way of using include guards like so:
#ifndef __SOMETHING_H__
#define __SOMETHING_H__
Here is the error:
../../engine/scene/../common/../bitsquid/queue.h:78:29: error: redefinition of ‘template<class T> void foundation::queue::reserve(foundation::Queue<T>&, uint32_t)’
../../engine/scene/../common/../bitsquid/queue.h:78:29: error: ‘template<class T> void foundation::queue::reserve(foundation::Queue<T>&, uint32_t)’ previously declared here
You can see that the path is the same. I am using g++ to compile the source. I would usually just replace this with the other style of include guards but I would like to avoid that as I did not write the library.
gcc version is 4.6.3