Hello,
I have some problems compiling fixed-containers on Windows, after updating the library in my project. (from 7725f0141aecddcf26118f059d952050bda73383 (Jun. 2021) to the newses 62e81fb596116485247d653b779501ed10a97843 (Oct. 2021))I only use FixedVector, EnumMap and EnumSet
Now I get this Error:
Error C7599 'fixed_containers::IteratorConstness::IteratorConstness': a trailing requires clause is only allowed on a templated fixed_containers\iterator_utils.hpp 16
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed_containers\bidirectional_iterator.hpp 29
So I pulled this project with all the tests, try to build it and got the same errors.
### Environment:
* **OS:** Windows 10
* **Compiler:** MSVC 19.29.30136.0
* **IDE:** Visual Studio 2019
## Error
**Compiler-Error:**
```bash
Error C7599 'fixed_containers::IteratorConstness::IteratorConstness': a trailing requires clause is only allowed on a templated function fixed-containers\include\fixed_containers\iterator_utils.hpp 16
Error C7599 'fixed_containers::IteratorDirection::IteratorDirection': a trailing requires clause is only allowed on a templated function fixed-containers\include\fixed_containers\iterator_utils.hpp 88
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\bidirectional_iterator.hpp 29
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\bidirectional_iterator.hpp 35
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\bidirectional_iterator.hpp 38
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\random_access_iterator_transformer.hpp 30
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\random_access_iterator_transformer.hpp 37
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed_containers\random_access_iterator_transformer.hpp 40
Error C2891 'CONSTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\random_access_iterator_transformer.hpp 41
Error C7599 'fixed_containers::fixed_red_black_tree_detail::RedBlackTreeNodeColorCompactness::RedBlackTreeNodeColorCompactness': a trailing requires clause is only allowed on a templated function fixed-containers\include\fixed_containers\fixed_red_black_tree_nodes.hpp 20
Error C2891 'COMPACTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\fixed_red_black_tree_nodes.hpp 292
Error C2891 'COMPACTNESS': cannot take the address of a template parameter fixed-containers\include\fixed_containers\fixed_red_black_tree_storage.hpp 59
....
Side Note:
Other Compiler Error I found with MSVC:
Error C7595 'fixed_containers::StringLiteral::StringLiteral': call to immediate function is not a constant expression fixed-containers\include\fixed_containers\string_literal.hpp 38
Easy fix, just set members in the initializer list:
Hello, I have some problems compiling
fixed-containers
on Windows, after updating the library in my project. (from 7725f0141aecddcf26118f059d952050bda73383 (Jun. 2021) to the newses 62e81fb596116485247d653b779501ed10a97843 (Oct. 2021)) I only useFixedVector
,EnumMap
andEnumSet
Now I get this Error:
So I pulled this project with all the tests, try to build it and got the same errors.
Steps to Reproduce:
git clone https://github.com/teslamotors/fixed-containers
cd fixed-containers
Had to modify the dependencies in the
CMakeList.txt
for vcpkg to work:find_package(magic_enum CONFIG REQUIRED)
find_package(Microsoft.GSL CONFIG REQUIRED)
find_package(range-v3 CONFIG REQUIRED)
find_package(GTest CONFIG REQUIRED)
macro(add_test_dependencies TEST_TARGET) target_link_libraries(${TEST_TARGET} PRIVATE magic_enum::magic_enum) target_link_libraries(${TEST_TARGET} PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(${TEST_TARGET} PRIVATE Microsoft.GSL::GSL)
endmacro()
Side Note:
Easy fix, just set members in the initializer list: