map in c++ causes error - c++

I have header file. I want a map object added to one of the structures. So I included
#include<map>
and compiled the program (note I did not use map object I just included it) and I got the following error
/usr/include/c++/4.7/bits/stl_map.h:115:28: error: macro "value_compare" requires 2 arguments, but only 1 given
/usr/include/c++/4.7/bits/stl_map.h:733:45: error: macro "value_compare" requires 2 arguments, but only 1 given
In file included from /usr/include/c++/4.7/map:62:0,
from ../optimizer_types.h:16,
from ../main.cpp:20:
/usr/include/c++/4.7/bits/stl_multimap.h:115:28: error: macro "value_compare" requires 2 arguments, but only 1 given
/usr/include/c++/4.7/bits/stl_multimap.h:656:45: error: macro "value_compare" requires 2 arguments, but only 1 given
In file included from /usr/include/c++/4.7/map:61:0,
from ../optimizer_types.h:16,
from ../main.cpp:20:
/usr/include/c++/4.7/bits/stl_map.h:113:11: error: invalid use of non-static data member 'std::map<_Key, _Tp, _Compare, _Alloc>::value_compare::comp'
/usr/include/c++/4.7/bits/stl_map.h:116:4: error: from this location
/usr/include/c++/4.7/bits/stl_map.h:116:9: error: '__c' was not declared in this scope
/usr/include/c++/4.7/bits/stl_map.h:116:12: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.7/bits/stl_map.h:116:12: error: expected ';' at end of member declaration
/usr/include/c++/4.7/bits/stl_map.h:116:14: error: expected unqualified-id before '{' token
/usr/include/c++/4.7/bits/stl_map.h: In member function 'std::map<_Key, _Tp, _Compare, _Alloc>::value_compare std::map<_Key, _Tp, _Compare, _Alloc>::value_comp() const':
/usr/include/c++/4.7/bits/stl_map.h:733:46: error: expected primary-expression before ';' token
In file included from /usr/include/c++/4.7/map:62:0,
from ../optimizer_types.h:16,
from ../main.cpp:20:
/usr/include/c++/4.7/bits/stl_multimap.h: At global scope:
/usr/include/c++/4.7/bits/stl_multimap.h:113:11: error: invalid use of non-static data member 'std::multimap<_Key, _Tp, _Compare, _Alloc>::value_compare::comp'
/usr/include/c++/4.7/bits/stl_multimap.h:116:4: error: from this location
/usr/include/c++/4.7/bits/stl_multimap.h:116:9: error: '__c' was not declared in this scope
/usr/include/c++/4.7/bits/stl_multimap.h:116:12: error: a function call cannot appear in a constant-expression
/usr/include/c++/4.7/bits/stl_multimap.h:116:12: error: expected ';' at end of member declaration
/usr/include/c++/4.7/bits/stl_multimap.h:116:14: error: expected unqualified-id before '{' token
/usr/include/c++/4.7/bits/stl_multimap.h: In member function 'std::multimap<_Key, _Tp, _Compare, _Alloc>::value_compare std::multimap<_Key, _Tp, _Compare, _Alloc>::value_comp() const':
/usr/include/c++/4.7/bits/stl_multimap.h:656:46: error: expected primary-expression before ';' token
As an experiment I moved the include to a cpp file and it was compiling properly.
What could be the reason

Try this:
#ifdef value_compare
#undefine value_compare // std::map header doesn't like this
#endif
#include <map>
It's not very flexible (or pretty) but it should get you through this :(
Edit: Either way, the problem is not including map, but the earlier include/code that defined value_compare macro. Is it a C header? (I doubt a C++ would define a macro with this name, as value_compare is an important part of the C++ standard library).

Related

pcl::VoxelGrid How to get number of points in each voxel grid?

I understand that pcl::VoxelGrid<PointT> can be used to downsample a PointCloud. In my use case, I want to get the number of points within each voxel grid. From PCL docs I found the leaf struct allows me to get the number of points in one voxel by calling getPointCount(). And pcl::VoxelGridCovariance allows me to get a leaf by calling getLeaf(). But I don't know how to apply all of these to a point cloud. I tried to initialize a pcl::VoxelGridCovariance<PointT> by pcl::VoxelGridCovariance<pcl::PCLPointCloud2> grid; but got the error as below. Could anyone know what's the problem here? Or is there any other way to get the number of points in each voxel? Any advice is appreciated!
/usr/local/include/pcl-1.11/pcl/point_struct_traits.h: In instantiation of ‘struct pcl::traits::fieldList<pcl::PCLPointCloud2>’:
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:79:70: required from ‘class pcl::VoxelGridCovariance<pcl::PCLPointCloud2>’
/home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:549:60: required from here
/usr/local/include/pcl-1.11/pcl/point_struct_traits.h:198:8: error: invalid use of incomplete type ‘struct pcl::traits::fieldList<pcl::PCLPointCloud2>’
struct fieldList /** \cond NO_WARN_RECURSIVE */ : fieldList<typename POD<PointT>::type> /** \endcond */
^~~~~~~~~
/usr/local/include/pcl-1.11/pcl/point_struct_traits.h:198:8: note: declaration of ‘struct pcl::traits::fieldList<pcl::PCLPointCloud2>’
In file included from /usr/local/include/pcl-1.11/pcl/point_struct_traits.h:42:0,
from /usr/local/include/pcl-1.11/pcl/type_traits.h:40,
from /usr/local/include/pcl-1.11/pcl/memory.h:46,
from /usr/local/include/pcl-1.11/pcl/io/pcd_io.h:42,
from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:8:
/usr/local/include/pcl-1.11/pcl/point_struct_traits.h:204:3: error: no matching function for call to ‘assertion_failed<false>(mpl_::failed************ (pcl::traits::fieldList<pcl::PCLPointCloud2>::POINT_TYPE_NOT_PROPERLY_REGISTERED::************)(pcl::PCLPointCloud2&))’
BOOST_MPL_ASSERT_MSG((!std::is_same<PointT, typename POD<PointT>::type>::value),
^
/usr/include/boost/mpl/assert.hpp:83:5: note: candidate: template<bool C> int mpl_::assertion_failed(typename mpl_::assert<C>::type)
int assertion_failed( typename assert<C>::type );
^~~~~~~~~~~~~~~~
/usr/include/boost/mpl/assert.hpp:83:5: note: template argument deduction/substitution failed:
/usr/local/include/pcl-1.11/pcl/point_struct_traits.h:204:3: note: cannot convert ‘pcl::traits::fieldList<pcl::PCLPointCloud2>::POINT_TYPE_NOT_PROPERLY_REGISTERED205::assert_arg()’ (type ‘mpl_::failed************ (pcl::traits::fieldList<pcl::PCLPointCloud2>::POINT_TYPE_NOT_PROPERLY_REGISTERED::************)(pcl::PCLPointCloud2&)’) to type ‘mpl_::assert<false>::type {aka mpl_::assert<false>}’
BOOST_MPL_ASSERT_MSG((!std::is_same<PointT, typename POD<PointT>::type>::value),
^
In file included from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:40:0:
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h: In instantiation of ‘class pcl::VoxelGridCovariance<pcl::PCLPointCloud2>’:
/home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:549:60: required from here
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:79:70: error: no type named ‘type’ in ‘struct pcl::traits::fieldList<pcl::PCLPointCloud2>’
using FieldList = typename pcl::traits::fieldList<PointT>::type;
^
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:80:61: error: no type named ‘PointCloud’ in ‘class pcl::Filter<pcl::PCLPointCloud2>’
using PointCloud = typename Filter<PointT>::PointCloud;
^
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:56:9: error: ‘std::__cxx11::string pcl::Filter<pcl::PCLPointCloud2>::filter_name_’ is protected within this context
class VoxelGridCovariance : public VoxelGrid<PointT>
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/pcl-1.11/pcl/filters/filter_indices.h:42:0,
from /usr/local/include/pcl-1.11/pcl/filters/extract_indices.h:42,
from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:13:
/usr/local/include/pcl-1.11/pcl/filters/filter.h:240:19: note: declared protected here
std::string filter_name_;
^~~~~~~~~~~~
In file included from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:40:0:
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:56:9: error: ‘const string& pcl::Filter<pcl::PCLPointCloud2>::getClassName() const’ is protected within this context
class VoxelGridCovariance : public VoxelGrid<PointT>
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/pcl-1.11/pcl/filters/filter_indices.h:42:0,
from /usr/local/include/pcl-1.11/pcl/filters/extract_indices.h:42,
from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:13:
/usr/local/include/pcl-1.11/pcl/filters/filter.h:253:7: note: declared protected here
getClassName () const
^~~~~~~~~~~~
In file included from /home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:40:0:
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h: In instantiation of ‘pcl::VoxelGridCovariance<PointT>::VoxelGridCovariance() [with PointT = pcl::PCLPointCloud2]’:
/home/linux/Documents/waymo_onTheGo/cart_boundary.cpp:549:60: required from here
/usr/local/include/pcl-1.11/pcl/filters/voxel_grid_covariance.h:205:18: error: using invalid field ‘pcl::VoxelGridCovariance<PointT>::voxel_centroids_’
kdtree_ ()
^
To just access the number of points, use OctreePointCloudDensity
To also access the points inside each voxel, use OctreePointCloudPointVector

Using CLAHE algorithm

I am trying to use the source code provided here for CLAHE algorithm.
When I include the "ClaheImageFilter.h" in my code and compile it, it gives me the following errors:
> In file included from /myDir/myCode.cxx:25:
> /myDir/ClaheImageFilter.h: In member function ‘void
ClaheImageFilter<T_ItkImage>::_execute(typename T_ItkImage::Pointer)’:
> /myDir/ClaheImageFilter.h:1270: error: expected initializer
before ‘&’ token
> /myDir/ClaheImageFilter.h:1271: error:
‘roLargestSize’ was not declared in this scope
> /myDir/ClaheImageFilter.h: In member function ‘void
ClaheImageFilter<T_ItkImage>::_fromFlatArrayToItk(typename
T_ItkImage::PixelType*, const typename T_ItkImage::SizeType&, unsigned
int)’:
> /myDir/ClaheImageFilter.h:1498: error: expected ‘;’
before ‘start’ /myDir/ClaheImageFilter.h:1499: error: ‘start’
was not declared in this scope
Does anyone know what is causing the problem?
line 25 in myCode.cxx is just #include "ClaheImageFilter.h".

Compiling C++ Thrift code to interface Cassandra results in following errors. What are we missing here?

$ g++ -lthrift -Wall thriftfs.cpp cassandra_constants.cpp Cassandra.cpp cassandra_types.cpp -o thriftfs -I/usr/local/include/thrift -L/usr/local/lib
In file included from /usr/local/include/thrift/protocol/TProtocol.h:23:0,
from /usr/local/include/thrift/TProcessor.h:24,
from Cassandra.h:10,
from t`enter code here`hriftfs.cpp:4:
/usr/local/include/thrift/transport/TTransport.h:34:1: error: ‘uint32_t’ does not name a type
/usr/local/include/thrift/transport/TTransport.h:156:29: error: ISO C++ forbids declaration of ‘buf’ with no type [-fpermissive]
In file included from /usr/local/include/thrift/TProcessor.h:24:0,
from Cassandra.h:10,
from thriftfs.cpp:4:
/usr/local/include/thrift/protocol/TProtocol.h:184:1: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:10:0,
from thriftfs.cpp:4:
/usr/local/include/thrift/TProcessor.h:72:57: error: ‘uint32_t’ has not been declared
In file included from cassandra_types.h:11:0,
from Cassandra.h:11,
from thriftfs.cpp:4:
/usr/local/include/thrift/TApplicationException.h:94:3: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:85:16: error: ‘uint8_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:142:3: error: ‘uint32_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:1478:16: error: ‘uint8_t’ does not name a type
In file included from Cassandra.h:11:0,
from thriftfs.cpp:4:
cassandra_types.h:1812:3: error: ‘uint32_t’ does not name a type
In file included from thriftfs.cpp:4:0:
Cassandra.h:217:3: error: ‘uint32_t’ does not name a type
Cassandra.h:4857:35: error: ‘org::apache::thrift’ has not been declared
Cassandra.h:4857:62: error: expected ‘,’ or ‘...’ before ‘*’ token
Cassandra.h:4859:71: error: cannot declare pointer to ‘void’ member
Cassandra.h:4859:145: error: template argument 2 is invalid
Cassandra.h:4859:145: error: template argument 4 is invalid
Cassandra.h:4860:45: error: ‘org::apache::thrift’ has not been declared
Cassandra.h:4860:72: error: expected ‘,’ or ‘...’ before ‘*’ token
Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:42: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:42: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:77: error: template argument 1 is invalid
Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:105: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
Cassandra.h:4935:105: note: suggested alternative:
/usr/local/include/thrift/Thrift.h:75:37: note: ‘apache::thrift’
Cassandra.h:4935:140: error: template argument 1 is invalid
Cassandra.h: In constructor ‘org::apache::cassandra::CassandraProcessor::CassandraProcessor(boost::shared_ptr)’:
Cassandra.h:4898:49: error: assignment of read-only location ‘"login"[((org::apache::cassandra::CassandraProcessor*)this)->org::apache::cassandra::CassandraProcessor::processMap_]’
Cassandra.h:4898:49: error: cannot convert ‘void (org::apache::cassandra::CassandraProcessor::*)(int32_t, int) {aka void (org::apach
Add the following defines:
g++ -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H ...
Or add #include <stdint.h> before including Thrift.h in your code.
See the discussion at THRIFT-1326. The issue is suppposedly fixed in thrift 0.9.
It looks like your problem is a compiler issue.
It can't find the type "uint32_t"
There is another question on SO regarding this:
'uint32_t' identifier not found error
Quoted from user templatetypedef
This type is defined in the C header which is not currently
a part of the C++ standard. According to the Wikipedia page on the
header, it hasn't shipped with Visual Studio until VS2010.
In the meantime, you could probably fake up your own version of the
header by adding typedefs that map Microsoft's custom integer types to
the types expected by C. For example:
typedef __int32 int32_t; typedef unsigned __int32 uint32_t; /* ...
etc. ... */ Hope this helps!

Compile errors with linked files in C++

Edit: I've reduced a majority of the errors with the std:: prefix on string declarations. However, there seems to be a problem with a few functions, particularly the definitions of those functions who have a string as a parameter.
Edit #2: Updated my code (I DID have the std:: prefix on my function declarations, but hadn't reflected it in my post). Please see the very bottom for errors displayed when I add the std:: prefix to string parameters in the problematic functions.
I have a header file movie.h with the following code (relevant code):
#include <string>
class Movie
{
public:
void addMovieName(std::string movie);
void addLastName(std::string nameLast);
void addFirstName(std::string nameFirst);
private:
string movieName,
directorLastName,
directorFirstName,
directorFullName;
};
And an implementation file movie.cpp like this (relevant code):
#include "movie.h"
// addFirstName, addLastName, and addMovie name all do the same things
// so I'm only including one since they all generate the same error
void Movie::addFirstName(string nameFirst)
{
directorFirstName = nameFirst.resize(10, ' ');
}
Upon compilation, I get the following errors:
g++ -c movie.cpp -o movie.o
movie.cpp:225: error: variable or field ‘addFirstName’ declared void
movie.cpp:225: error: ‘int Movie::addFirstName’ is not a static member of ‘class Movie’
movie.cpp:225: error: ‘string’ was not declared in this scope
movie.cpp:226: error: expected ‘,’ or ‘;’ before ‘{’ token
movie.cpp:240: error: variable or field ‘addLastName’ declared void
movie.cpp:240: error: ‘int Movie::addLastName’ is not a static member of ‘class Movie’
movie.cpp:240: error: ‘string’ was not declared in this scope
movie.cpp:241: error: expected ‘,’ or ‘;’ before ‘{’ token
movie.cpp:255: error: variable or field ‘addMovieName’ declared void
movie.cpp:255: error: ‘int Movie::addMovieName’ is not a static member of ‘class Movie’
movie.cpp:255: error: ‘string’ was not declared in this scope
movie.cpp:256: error: expected ‘,’ or ‘;’ before ‘{’ token
make: *** [movie.o] Error 1
Some of who have said I need to prepend std:: to the string parameters in the function definitions.
Upon doing this:
// adding std:: prefix
void Movie::addFirstName(std::string nameFirst)
{
directorFirstName = nameFirst.resize(10, ' ');
}
I get the following errors. Note that I only changed it for a single function. The first errors I don't understand, whereas the rest remain the same as before.
g++ -c movie.cpp -o movie.o
movie.cpp: In member function ‘void Movie::addFirstName(std::string)’:
movie.cpp:227: error: no match for ‘operator=’ in ‘((Movie*)this)->Movie::directorFirstName = nameFirst.std::basic_string<_CharT, _Traits, _Alloc>::resize [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>](10u, 32)’
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:485: note: candidates are: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:493: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_string.h:504: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]
movie.cpp: At global scope:
movie.cpp:240: error: variable or field ‘addLastName’ declared void
movie.cpp:240: error: ‘int Movie::addLastName’ is not a static member of ‘class Movie’
movie.cpp:240: error: ‘string’ was not declared in this scope
movie.cpp:241: error: expected ‘,’ or ‘;’ before ‘{’ token
movie.cpp:255: error: variable or field ‘addMovieName’ declared void
movie.cpp:255: error: ‘int Movie::addMovieName’ is not a static member of ‘class Movie’
movie.cpp:255: error: ‘string’ was not declared in this scope
movie.cpp:256: error: expected ‘,’ or ‘;’ before ‘{’ token
make: *** [movie.o] Error 1
You have not specified the correct namespace for string, string is a member of the std namespace. In this case you need to write std::string since I see no "using namespace std;" in your code.
replace:
string movieName,
directorLastName,
directorFirstName,
directorFullName;
with:
std::string movieName,
directorLastName,
directorFirstName,
directorFullName;
Why are all your private fields pointers? Storing plain ints and floats as fields is perfectly okay. Moreover, you don't need to "initialize" strings in your constructor. If you don't, their default constructors will be called automatically (strings will be empty). And why do you pad strings? Even if you need it when displaying, pad them there.
No one has answered the question yet, so I figured I'd just put it here myself since I figured it out. Basically, my solution was:
Use using std::string in header and implementation files.
Secondly, the declaration:
stringOne = stringTwo.resize(some_number, ' ');
...fails because resize() is a void returning function. Replacing that with two separate statements; namely:
stringOne = stringTwo;
stringOne.resize(/* blah */);
...solves the rest of the errors. Credit to #Jesse for mentioning this in the comments.

Boost date_time cpp files missing

I'm trying to compile this program and I'm having trouble finding the following files online:
#include <libs/date_time/src/posix_time/posix_time_types.cpp>
#include <libs/date_time/src/gregorian/date_generators.cpp>
speed_test\speed_test.cpp|42|error: boost/date_time/posix_time/posix_time_types.cpp: No such file or directory|
speed_test\speed_test.cpp|43|error: boost/date_time/gregorian/date_generators.cpp: No such file or directory|
speed_test\MruCache.h||In member function 'void MruCache<key_type, value_type>::__insert_item(key_type, value_type)':|
speed_test\MruCache.h|70|error: 'ptrItr' was not declared in this scope|
speed_test\MruCache.h|71|error: expected primary-expression before ')' token|
speed_test\MruCache.h|71|error: expected ';' before 'mapOfListIteratorPtr'|
speed_test\MruCache.h|87|error: expected type-specifier|
speed_test\MruCache.h|87|error: expected ';'|
speed_test\MruCache.h||In member function 'value_type MruCache<key_type, value_type>::__find_item(key_type)':|
speed_test\MruCache.h|104|error: 'ptrItr' was not declared in this scope|
speed_test\MruCache.h|105|error: expected primary-expression before ')' token|
speed_test\MruCache.h|105|error: expected ';' before 'mapOfListIteratorPtr'|
C:\Dev-Cpp\project2\speed_test\MruCache.h||In member function 'virtual void MruCache<key_type, value_type>::__clear()':|
speed_test\MruCache.h|119|error: expected ';' before 'i'|
speed_test\MruCache.h|120|error: 'i' was not declared in this scope|
speed_test\MruCache.h|123|error: 'pItr' was not declared in this scope|
speed_test\MruCache.h|123|error: expected primary-expression before ')' token|
speed_test\MruCache.h|123|error: expected ';' before 'ptrItr'|
speed_test\mru.h|142|error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'|
speed_test\mru.h|142|error: expected a type, got 'boost::unordered_map::iterator'|
speed_test\mru.h|143|error: invalid type in declaration before '=' token|
speed_test\speed_test.cpp||In function 'int main(int, char**)':|
speed_test\speed_test.cpp|178|error: 'ihash' was not declared in this scope|
speed_test\speed_test.cpp|178|error: template argument 3 is invalid|
speed_test\speed_test.cpp|178|error: invalid type in declaration before ';' token|
speed_test\speed_test.cpp|186|error: request for member 'clear' in 'tiles1_2', which is of non-class type 'int'|
speed_test\speed_test.cpp|191|error: no match for 'operator[]' in 'tiles1_2[keys.std::vector<T, Allocator>::operator[] [with _Tp = tile_id, _Alloc = std::allocator<tile_id>](((unsigned int)i))]'|
speed_test\speed_test.cpp|202|error: no match for 'operator[]' in 'tiles1_2[keys.std::vector<T, Allocator>::operator[] [with _Tp = tile_id, _Alloc = std::allocator<tile_id>](((unsigned int)i))]'|
speed_test\speed_test.cpp|433|error: request for member 'find' in 'tiles1_2', which is of non-class type 'int'|
speed_test\speed_test.cpp|560|error: request for member 'clear' in 'tiles1_2', which is of non-class type 'int'|
speed_test\mru.h|241|instantiated from 'Value& mru::list<Key, Value>::operator[](const Key&) [with Key = tile_id, Value = boost::shared_ptr<test>]'|
speed_test\speed_test.cpp|340|instantiated from here|
speed_test\mru.h|143|error: dependent-name 'boost::unordered_map::value_type' is parsed as a non-type, but instantiation yields a type|
speed_test\mru.h|143|note: say 'typename boost::unordered_map::value_type' if a type is meant|
speed_test\mru.h|241|instantiated from 'Value& mru::list<Key, Value>::operator[](const Key&) [with Key = tile_id, Value = boost::shared_ptr<test>]'|
speed_test\speed_test.cpp|340|instantiated from here|
speed_test\mru.h|143|warning: unused variable 'p'|
||=== Build finished: 27 errors, 1 warnings ===|
You seem to have some mistake in the #include directive, boost libraries are usually included as
#include <boost/whatever.hpp>
or
#include <boost/module/header.hpp>
Or if the boost libraries were not installed to your include paths and it is present in the current directory:
#include "boost_1_46_1/boost/..."
Rules for the filename are as said above
Read the docs for more info