Reputation: 2541
The following code raises many errors:
namespace ns1 {
#include <boost/lockfree/queue.hpp>
...
}
/usr/include/c++/4.9/cstdlib:118: error: '::div_t' has not been declared using ::div_t; ^
/usr/include/c++/4.9/cstdlib:119: error: '::ldiv_t' has not been declared using ::ldiv_t; ^
As far as I understand the error cstdlib is in a namespace but stdlib.h is not (which is included from cstdlib and used for most definitions).
What technical solutions allow me to keep the inclusion under a custom namespace and resolve any collisions?
Upvotes: 0
Views: 980
Reputation: 2520
Usually errors like this are caused by something you included before it.
Check for classes or structs defined without a semi-colon after the closing brace.
Upvotes: 0