shaohua0720 / cpp-btree

Automatically exported from code.google.com/p/cpp-btree
Apache License 2.0
0 stars 0 forks source link

COMPILE_ASSERT problem #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Compile using MSVC 2013

What is the expected output? What do you see instead?
Compilation failed!

What version of the product are you using? On what operating system?

Windows 7(64) + MSVC 2013

Please provide any additional information below.

Compile error:

btree.h(1401) : error C2118: Negative subscript
That is the 

COMPILE_ASSERT(
      sizeof(key_compare_checker(key_compare_helper()(key_type(), key_type()))) ==
      sizeof(big_),
      key_comparison_function_must_return_bool);

Original issue reported on code.google.com by zwc1...@gmail.com on 22 Dec 2013 at 3:49

GoogleCodeExporter commented 8 years ago
I had the same in Visual Studio 2013 Update 1.
It seems to be fixed replacing all "COMPILE_ASSERT" by "static_assert" and 
following messages by char* literal.

Original comment by Adatc...@gmail.com on 15 Jul 2014 at 10:53