Dear all,

I require to use a vector of an array of FunctionParsers in my code

std::vector< std::array<FunctionParser<2>, 4> > fps_vec;

At a later point when I know its size, I call

fps_vec.resize(size);

This line produces a long build error message (attached) starting with

invalid application of ‘sizeof’ to incomplete type ‘mu::Parser’
  static_assert(sizeof(_Tp)>0,

If I comment out the resize line, then the remaining program compiles 
successfully. I noted that such an error occurs when the compiler is not 
able to see the object's declaration. But I already included the header 
file deal.II/base/function_parser.h. Wouldn't that point to relevant 
muparser's header file?

In a different file, I had used an std array of FunctionParsers and that 
worked fine. Doesn't that mean that the definition of mu::Parser is visible 
to compiler? I am unable to understand what is causing this error.

Is there any workaround for this? Thanks in advance!

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/62d071e2-8bc9-4c44-8007-78e02f38e943n%40googlegroups.com.
make
Scanning dependencies of target IBCs
[  4%] Building CXX object IBCs/CMakeFiles/IBCs.dir/piecewise_function.cc.o
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
                 from /usr/include/c++/7/locale:43,
                 from /home/vachan/bin/dealii/include/deal.II/bundled/boost/archive/basic_binary_iprimitive.hpp:32,
                 from /home/vachan/bin/dealii/include/deal.II/bundled/boost/archive/binary_iarchive_impl.hpp:20,
                 from /home/vachan/bin/dealii/include/deal.II/bundled/boost/archive/binary_iarchive.hpp:20,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:45,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = mu::Parser]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = mu::Parser; _Dp = std::default_delete<mu::Parser>]’
/usr/include/c++/7/bits/stl_construct.h:98:7:   required from ‘void std::_Destroy(_Tp*) [with _Tp = std::unique_ptr<mu::Parser>]’
/usr/include/c++/7/bits/stl_construct.h:108:19:   required from ‘static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::unique_ptr<mu::Parser>*; bool <anonymous> = false]’
/usr/include/c++/7/bits/stl_construct.h:137:11:   required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::unique_ptr<mu::Parser>*]’
/usr/include/c++/7/bits/stl_construct.h:206:15:   required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator<_T2>&) [with _ForwardIterator = std::unique_ptr<mu::Parser>*; _Tp = std::unique_ptr<mu::Parser>]’
/usr/include/c++/7/bits/stl_vector.h:434:22:   [ skipping 7 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/7/bits/stl_uninitialized.h:134:15:   required from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const std::array<dealii::FunctionParser<2>, 4>*; _ForwardIterator = std::array<dealii::FunctionParser<2>, 4>*]’
/usr/include/c++/7/bits/stl_uninitialized.h:289:37:   required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = const std::array<dealii::FunctionParser<2>, 4>*; _ForwardIterator = std::array<dealii::FunctionParser<2>, 4>*; _Tp = std::array<dealii::FunctionParser<2>, 4>]’
/usr/include/c++/7/bits/stl_uninitialized.h:311:2:   required from ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = std::array<dealii::FunctionParser<2>, 4>*; _ForwardIterator = std::array<dealii::FunctionParser<2>, 4>*; _Allocator = std::allocator<std::array<dealii::FunctionParser<2>, 4> >]’
/usr/include/c++/7/bits/vector.tcc:578:44:   required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::array<dealii::FunctionParser<2>, 4>; _Alloc = std::allocator<std::array<dealii::FunctionParser<2>, 4> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/7/bits/stl_vector.h:692:21:   required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::array<dealii::FunctionParser<2>, 4>; _Alloc = std::allocator<std::array<dealii::FunctionParser<2>, 4> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:58:38:   required from here
/usr/include/c++/7/bits/unique_ptr.h:76:22: error: invalid application of ‘sizeof’ to incomplete type ‘mu::Parser’
  static_assert(sizeof(_Tp)>0,
                      ^
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h: In instantiation of ‘tbb::interface6::internal::construct_by_args<T, P>::construct(void*)::<lambda(const typename tbb::internal::strip<P>::type& ...)> [with T = std::vector<std::unique_ptr<mu::Parser> >; P = {const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&}]’:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:633:34:   required from ‘struct tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<std::unique_ptr<mu::Parser> >; P = {const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&}]::<lambda(const type&)>’
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:633:31:   required from ‘void tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<std::unique_ptr<mu::Parser> >; P = {const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&}]’
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:676:39:   required from ‘void tbb::interface6::internal::callback_leaf<T, Constructor>::construct(void*) [with T = std::vector<std::unique_ptr<mu::Parser> >; Constructor = tbb::interface6::internal::construct_by_args<std::vector<std::unique_ptr<mu::Parser> >, const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&>]’
/home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:77:2:   required from here
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: no matching function for call to ‘std::vector<std::unique_ptr<mu::Parser> >::vector(const type&)’
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: note:   candidate expects 3 arguments, 1 provided
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ to ‘std::initializer_list<std::unique_ptr<mu::Parser> >’
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >] <near match>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   conversion of argument 1 would be ill-formed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: invalid user-defined conversion from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ to ‘std::vector<std::unique_ptr<mu::Parser> >&&’ [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note: candidate is: dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<std::unique_ptr<mu::Parser> >] <near match>
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   passing ‘const type* {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >*}’ as ‘this’ argument discards qualifiers
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: passing ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ as ‘this’ argument discards qualifiers [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   in call to ‘dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<std::unique_ptr<mu::Parser> >]’
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >] <near match>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   conversion of argument 1 would be ill-formed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: invalid user-defined conversion from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ to ‘const std::vector<std::unique_ptr<mu::Parser> >&’ [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note: candidate is: dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<std::unique_ptr<mu::Parser> >] <near match>
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   passing ‘const type* {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >*}’ as ‘this’ argument discards qualifiers
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: passing ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ as ‘this’ argument discards qualifiers [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   in call to ‘dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<std::unique_ptr<mu::Parser> >]’
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::unique_ptr<mu::Parser>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ to ‘std::vector<std::unique_ptr<mu::Parser> >::size_type {aka long unsigned int}’
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::unique_ptr<mu::Parser> >]
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser> > >}’ to ‘const allocator_type& {aka const std::allocator<std::unique_ptr<mu::Parser> >&}’
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = std::unique_ptr<mu::Parser>; _Alloc = std::allocator<std::unique_ptr<mu::Parser> >]
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 1 provided
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h: In instantiation of ‘tbb::interface6::internal::construct_by_args<T, P>::construct(void*)::<lambda(const typename tbb::internal::strip<P>::type& ...)> [with T = std::vector<double>; P = {const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&}]’:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:633:34:   required from ‘struct tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<double>; P = {const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&}]::<lambda(const type&)>’
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:633:31:   required from ‘void tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<double>; P = {const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&}]’
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:676:39:   required from ‘void tbb::interface6::internal::callback_leaf<T, Constructor>::construct(void*) [with T = std::vector<double>; Constructor = tbb::interface6::internal::construct_by_args<std::vector<double>, const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&>]’
/home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:77:2:   required from here
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: no matching function for call to ‘std::vector<double>::vector(const type&)’
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: note:   candidate expects 3 arguments, 1 provided
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ to ‘std::initializer_list<double>’
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator<double>] <near match>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   conversion of argument 1 would be ill-formed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: invalid user-defined conversion from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ to ‘std::vector<double>&&’ [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note: candidate is: dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<double>] <near match>
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   passing ‘const type* {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >*}’ as ‘this’ argument discards qualifiers
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: passing ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ as ‘this’ argument discards qualifiers [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   in call to ‘dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<double>]’
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>] <near match>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   conversion of argument 1 would be ill-formed:
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: invalid user-defined conversion from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ to ‘const std::vector<double>&’ [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note: candidate is: dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<double>] <near match>
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   passing ‘const type* {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >*}’ as ‘this’ argument discards qualifiers
In file included from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:634:20: error: passing ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ as ‘this’ argument discards qualifiers [-fpermissive]
                    new(where) T(args...);
                    ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26:0,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:227:10: note:   in call to ‘dealii::Threads::ThreadLocalStorage<T>::operator T&() [with T = std::vector<double>]’
   inline ThreadLocalStorage<T>::operator T &()
          ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/vachan/bin/dealii/include/deal.II/base/utilities.h:23,
                 from /home/vachan/bin/dealii/include/deal.II/base/tensor.h:26,
                 from /home/vachan/bin/dealii/include/deal.II/base/point.h:23,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:6,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = double; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ to ‘std::vector<double>::size_type {aka long unsigned int}’
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<double>]
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   no known conversion for argument 1 from ‘const type {aka const dealii::Threads::ThreadLocalStorage<std::vector<double> >}’ to ‘const allocator_type& {aka const std::allocator<double>&}’
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = double; _Alloc = std::allocator<double>]
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 1 provided
In file included from /home/vachan/bin/dealii/include/deal.II/bundled/tbb/enumerable_thread_specific.h:30:0,
                 from /home/vachan/bin/dealii/include/deal.II/base/thread_local_storage.h:24,
                 from /home/vachan/bin/dealii/include/deal.II/base/function_parser.h:26,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.h:8,
                 from /home/vachan/Documents/Work/pens2D/IBCs/piecewise_function.cc:6:
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/internal/_template_helpers.h:141:6: error: ‘void tbb::internal::call(F&&, Pack&&) [with F = tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<std::unique_ptr<mu::Parser> >; P = {const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&}]::<lambda(const type&)>; Pack = tbb::internal::stored_pack<const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&>&]’, declared using local type ‘tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<std::unique_ptr<mu::Parser> >; P = {const dealii::Threads::ThreadLocalStorage<std::vector<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> >, std::allocator<std::unique_ptr<mu::Parser, std::default_delete<mu::Parser> > > > >&}]::<lambda(const type&)>’, is used but never defined [-fpermissive]
 void call( F&& f, Pack&& p ) {
      ^~~~
/home/vachan/bin/dealii/include/deal.II/bundled/tbb/internal/_template_helpers.h:141:6: error: ‘void tbb::internal::call(F&&, Pack&&) [with F = tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<double>; P = {const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&}]::<lambda(const type&)>; Pack = tbb::internal::stored_pack<const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&>&]’, declared using local type ‘tbb::interface6::internal::construct_by_args<T, P>::construct(void*) [with T = std::vector<double>; P = {const dealii::Threads::ThreadLocalStorage<std::vector<double, std::allocator<double> > >&}]::<lambda(const type&)>’, is used but never defined [-fpermissive]
IBCs/CMakeFiles/IBCs.dir/build.make:158: recipe for target 'IBCs/CMakeFiles/IBCs.dir/piecewise_function.cc.o' failed
make[2]: *** [IBCs/CMakeFiles/IBCs.dir/piecewise_function.cc.o] Error 1
CMakeFiles/Makefile2:330: recipe for target 'IBCs/CMakeFiles/IBCs.dir/all' failed
make[1]: *** [IBCs/CMakeFiles/IBCs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Reply via email to