etl: Compile error in etl/type_traits.h

Get compile error in release 18.3.3

test.cpp:

#include "platform.h"
int main() {
	return 0;
}

Compiler

g++ (MinGW.org GCC-8.2.0-3) 8.2.0

Error:

In file included from etl/limits.h:35,
                 from etl/platform.h:35,
                 from test_etl.cpp:1:
etl/type_traits.h:783:52: error: expected template-name before '<' token
   struct integral_constant : std::integral_constant<T, VALUE> {};
                                                    ^
etl/type_traits.h:783:52: error: expected '{' before '<' token
etl/type_traits.h:795:48: error: expected template-name before '<' token
   struct bool_constant : std::integral_constant<bool, B> { };
                                                ^
......

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

I found something. If platform.h is included as etl/platform.h compile will be successful.

Successful:

// test1.cpp
// g++ test1.cpp -o test1 -DETL_NO_STL -Iinclude

#include "etl/platform.h"
int main() {
    return 0;
}

Compile error:

// test2.cpp
// g++ test2.cpp -o test2 -DETL_NO_STL -Iinclude/etl

#include "platform.h"
int main() {
    return 0;
}

[g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0]