Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <utility>

typedef std::pair<char, char> WH;
typedef std::vector<WH> whvec;

int main(){
	int h, w;

	while( std::cin >> h >> w, w + h != 0 ){
		bool map[501][501];
		std::string in;
		whvec data[501][501];
		int data_max = 0;
		WH wh;

		for( int i = 1; i <= h; ++i ){
			std::cin >> in;
			for( int l = 1; l <= w; ++l ){
				map[i][l] = ( in[l - 1] == '.' );
			}
		}

		for( int i = 1; i <= h; ++i ){
			for( int l = 1; l <= w; ++l ){
				if( map[i][l] ){
					if( map[i - 1][l] && map[i][l - 1] ){
						int x_cnt = 0, y_cnt = 0;

						while( map[i][l - x_cnt] )x_cnt++;
						while( map[i - y_cnt][l] )y_cnt++;

						for( int m = 0; m < data[i - 1][l].size(); ++m ){
							wh = WH( std::min(data[i - 1][l][m].first, x_cnt), data[i - 1][l][m].second + 1 );
							if( std::find( data[i][l].begin(), data[i][l].end(), wh ) == data[i][l].end() ){
								data[i][l].push_back( wh );
								data_max = std::max( data_max, wh.first * wh.second );
							}
						}
						for( int m = 0; m < data[i][l - 1].size(); ++m ){
							wh = WH( data[i][l - 1][m].first + 1, std::min(data[i][l - 1][m].second, y_cnt) );
							if( std::find( data[i][l].begin(), data[i][l].end(), wh ) == data[i][l].end() ){
								data[i][l].push_back( wh );
								data_max = std::max( data_max, wh.first * wh.second );
							}
						}
						
					}else if( map[i - 1][l] ){
						for( int m = 0; m < data[i - 1][l].size(); ++m ){
							data[i][l].push_back( wh = WH( 1, data[i - 1][l][m].second + 1 ) );
							data_max = std::max( data_max, wh.first * wh.second );
						}

					}else if( map[i][l - 1] ){
						for( int m = 0; m < data[i][l - 1].size(); ++m ){
							data[i][l].push_back( wh = WH( data[i][l - 1][m].first + 1, 1 ) );
							data_max = std::max( data_max, wh.first * wh.second );
						}

					}else data[i][l].push_back( wh = WH( 1, 1 ) ), data_max = std::max( data_max, wh.first * wh.second );
				}	
			}
		}

		std::cout << data_max << std::endl;
 	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:74: error: no matching function for call to 'min(char&, int&)'
   39 |                                                         wh = WH( std::min(data[i - 1][l][m].first, x_cnt), data[i - 1][l][m].second + 1 );
      |                                                                  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:39:74: note:   deduced conflicting types for parameter 'const _Tp' ('char' and 'int')
   39 |                                                         wh = WH( std::min(data[i - 1][l][m].first, x_cnt), data[i - 1][l][m].second + 1 );
      |                                                                  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:6:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:39:74: note:   mismatched types 'std::initializer_list<_Tp>' and 'char'
   39 |                                                         wh = WH( std::min(data[i - 1][l][m].first, x_cnt), data[i - 1][l][m].second + 1 );
      |                                                                  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:46:103: error: no matching function for call to 'min(char&, int&)'
   46 |                                                         wh = WH( data[i][l - 1][m].first + 1, std::min(data[i][l - 1][m].second, y_cnt) );
      |                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:46:103: note:   deduced conflicting types for parameter 'const _Tp' ('char' and 'int')
   46 |                                                         wh = WH( data[i][l - 1][m].first + 1, std::min(data[i][l - 1][m].second, y_cnt) );
      |                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:46:103: note:   mismatched types 'std::initializer_list<_Tp>' and 'char'
   46 |                                                         wh = WH( data[i][l - 1][m].first + 1, std::min(data[i][l - 1][m].second, y_cnt) );
      |                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~