CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

error: ‘optional’ in namespace ‘std’ does not name a template type

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2020, 11:56
Default error: ‘optional’ in namespace ‘std’ does not name a template type
  #1
New Member
 
Mohammad Khojastehmehr
Join Date: Jul 2020
Posts: 19
Rep Power: 5
MCrossover97 is on a distinguished road
Hey there, hope you are doing fine

I was trying to add a library following this thread:
Adding Libraries to OpenFOAM

I tried to make the solver but then I got this error:
Code:
lnInclude/Reaktoro/Thermodynamics/Species/ThermoData.hpp:212:10: error: ‘optional’ in namespace ‘std’ does not name a template type
     std::optional<SpeciesThermoInterpolatedProperties> properties;
Then I searched and this solution came up. It says the reason is std:: optional is a part of C++17 standard; so you have to use std::experimental:: optional instead:
https://stackoverflow.com/questions/...e-or-directory

Unfortunately, this doesn't work either. can anyone help me with this?
Thank you so much!
MCrossover97 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2DOF Planning hull resistance study with overset CFD_fan OpenFOAM Running, Solving & CFD 7 July 13, 2021 05:03
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 02:54
interFoam/kOmegaSST tank filling with printStackError/Mules simpomann OpenFOAM Running, Solving & CFD 3 February 17, 2014 17:06
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 14:16


All times are GMT -4. The time now is 23:20.