을 실행할 때 다음과 같은 경고와 함께 플래그를 나는 형식 변환 경고입니다.
#include <boost/multi_array.hpp>
void function (boost::multi_array<unsigned char, 2> matrix) {
int nrows = matrix.shape()[0];
int ncols = matrix.shape()[1];
}
보고 경고 메시지가 아래. 이 뜻은 내가 암시적으로 변환하'오 unsigned int'일반'int'?
그렇다면,내 생각에 이것은 내가 원하는 무엇인가(필요한 계산을 수행하으로 nrows,ncols 나),그리고 그래서 내가 어떻게 변환 explicit?
image.cpp:93:32: warning: conversion to ‘int’ from ‘boost::const_multi_array_ref<float, 2ul, float*>::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
int nrows = matrix.shape()[0];