multi_array doesn't compile
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 70/100
Piste de recherche
Reproduisez le problème avec l’exemple MSVC du rapport, puis inspectez boost/multi_array/storage_order.hpp et boost/multi_array/multi_array_ref.hpp aux lignes indiquées. Vérifiez les diagnostics du constructeur liés aux appels assign obsolètes et aux déclarations extents ; le travail est terminé lorsque l’exemple se compile sans ces erreurs ni avertissements.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
There are a lot of errors with simple multi_array instantiation:
- declaration of 'extents' hides global declaration
- deprecated assign method is used instead of fill in boost::array used for extents and storage_order in multi_array constructor. Problem with storage_order constructor and multi_array constructor itself.
Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34810 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
#include <boost/multi_array.hpp>
GlobalFixture::GlobalFixture() {
boost::multi_array<double, 4> ma;
}
1>------ Build started: Project: mts_test_utility, Configuration: Debug x64 ------
1>GlobalFixture.cpp
1>C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(615,45): warning C4459: declaration of 'extents' hides global declaration
1>(compiling source file '/GlobalFixture.cpp')
1> C:\boost_1_88_0\boost\multi_array\base.hpp(69,33):
1> see declaration of 'boost::anonymous-namespace'::extents' 1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(615,45): 1> the template instantiation context (the oldest one first) is 1> C:\MTS\mts_test_utility\GlobalFixture.cpp(16,32): 1> see reference to class template instantiation 'boost::multi_array<double,4,std::allocator<double>>' being compiled 1> C:\boost_1_88_0\boost\multi_array.hpp(122,10): 1> see reference to class template instantiation 'boost::multi_array_ref<T,4>' being compiled 1> with 1> [ 1> T=double 1> ] 1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(612,3): 1> while compiling class template member function 'boost::multi_array_ref<T,4>::multi_array_ref(T *,const boost::general_storage_order<4> &,const __int64 *,const unsigned __int64 *)' 1> with 1> [ 1> T=double 1> ] 1> C:\boost_1_88_0\boost\multi_array.hpp(153,15): 1> see the first reference to 'boost::multi_array_ref<T,4>::multi_array_ref' in 'boost::multi_array<double,4,std::allocator<double>>::multi_array' 1> with 1> [ 1> T=double 1> ] 1> C:\MTS\mts_test_utility\GlobalFixture.cpp(16,32): 1> see the first reference to 'boost::multi_array<double,4,std::allocator<double>>::multi_array' in 'GlobalFixture::GlobalFixture' 1>C:\boost_1_88_0\boost\multi_array\storage_order.hpp(51,18): error C4996: 'boost::array<bool,4>::assign': please use fill instead 1>(compiling source file '/GlobalFixture.cpp') 1> C:\boost_1_88_0\boost\multi_array\storage_order.hpp(51,18): 1> the template instantiation context (the oldest one first) is 1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(413,10): 1> see reference to class template instantiation 'boost::const_multi_array_ref<T,4,T *>' being compiled 1> with 1> [ 1> T=double 1> ] 1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(350,22): 1> see reference to class template instantiation 'boost::general_storage_order<4>' being compiled 1> C:\boost_1_88_0\boost\multi_array\storage_order.hpp(47,5): 1> while compiling class template member function 'boost::general_storage_order<4>::general_storage_order(const boost::c_storage_order &)' 1> C:\boost_1_88_0\boost\multi_array.hpp(153,15): 1> see the first reference to 'boost::general_storage_order<4>::general_storage_order' in 'boost::multi_array<double,4,std::allocator<double>>::multi_array' 1> C:\MTS\mts_test_utility\GlobalFixture.cpp(16,32): 1> see the first reference to 'boost::multi_array<double,4,std::allocator<double>>::multi_array' in 'GlobalFixture::GlobalFixture' 1>C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(328,42): warning C4459: declaration of 'extents' hides global declaration 1>(compiling source file '/GlobalFixture.cpp') 1> C:\boost_1_88_0\boost\multi_array\base.hpp(69,33): 1> see declaration of 'boost::anonymous-namespace'::extents'
1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(328,42):
1> the template instantiation context (the oldest one first) is
1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(324,3):
1> while compiling class template member function 'boost::const_multi_array_ref<T,4,T *>::const_multi_array_ref(TPtr,const boost::general_storage_order<4> &,const __int64 *,const unsigned __int64 *)'
1> with
1> [
1> T=double,
1> TPtr=double *
1> ]
1> C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(616,15):
1> see the first reference to 'boost::const_multi_array_ref<T,4,T *>::const_multi_array_ref' in 'boost::multi_array_ref<T,4>::multi_array_ref'
1> with
1> [
1> T=double
1> ]
1> C:\boost_1_88_0\boost\multi_array.hpp(153,15):
1> see the first reference to 'boost::multi_array_ref<T,4>::multi_array_ref' in 'boost::multi_array<double,4,std::allocator>::multi_array'
1> with
1> [
1> T=double
1> ]
1> C:\MTS\mts_test_utility\GlobalFixture.cpp(16,32):
1> see the first reference to 'boost::multi_array<double,4,std::allocator>::multi_array' in 'GlobalFixture::GlobalFixture'
1>C:\boost_1_88_0\boost\multi_array\multi_array_ref.hpp(343,18): error C4996: 'boost::array<__int64,4>::assign': please use fill instead
1>(compiling source file '/GlobalFixture.cpp')
1>Done building project "mts_test_utility.vcxproj" -- FAILED.
- Langage dominant
- C++
- Étoiles
- 32
- Forks
- 39
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de boostorg/multi_array
-
boostorg/multi_array#35 · 2 commentaires · 1 personne assignée ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
boostorg/multi_array#34 ·
-
provide multi_array::swap Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
boostorg/multi_array#33 ·
-
Performance issue on resize Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
boostorg/multi_array#32 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
boostorg/multi_array#31 · 2 commentaires ·
Toutes les issues de boostorg/multi_array
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Ouverteai_reviewed
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
ydb-platform/ydb#53974 · 3 commentaires ·