Skip to content

Commit 5588f3b

Browse files
committed
Fix aarch64-native simplestl-simplemath compilation
- Use stdint.h consistently for all modes to avoid C++03/C++11 conflicts - Prevents vector template conflicts between standard library and simplestl - Resolves 'wrong number of template arguments' errors in aarch64-native CI
1 parent bcac382 commit 5588f3b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/platform.h.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#ifndef NCNN_PLATFORM_H
1616
#define NCNN_PLATFORM_H
1717

18-
// Ensure basic integer types are available in all modes
19-
// Use C header for compatibility with C++03 and simple modes
20-
#include <stdint.h>
18+
2119

2220
#cmakedefine01 NCNN_STDIO
2321
#cmakedefine01 NCNN_STRING
@@ -275,6 +273,9 @@ static inline void swap_endianness_32(void* x)
275273
#if NCNN_SIMPLESTL
276274
#include "simplestl.h"
277275
#else
276+
// Ensure basic integer types are available when not using simplestl
277+
// Use C header for compatibility with C++03 and simple modes
278+
#include <stdint.h>
278279
#include <algorithm>
279280
#include <list>
280281
#include <vector>

0 commit comments

Comments
 (0)